deepline 0.3.515 → 0.3.516

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 (178) hide show
  1. package/dist/bundling-sources/sdk/src/errors.ts +1 -0
  2. package/dist/bundling-sources/sdk/src/http-core.ts +9 -4
  3. package/dist/bundling-sources/sdk/src/index.ts +1 -0
  4. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  5. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +30 -15
  6. package/dist/bundling-sources/shared_libs/play-runtime/secret-redaction.ts +20 -7
  7. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +3 -1
  8. package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +45 -0
  9. package/dist/bundling-sources/shared_libs/tool-execution-error.ts +45 -0
  10. package/dist/cli/{artifacts-C3262FEY.mjs → artifacts-G56FISIE.mjs} +9 -9
  11. package/dist/cli/{artifacts-6ONZSASU.js → artifacts-KMWS32R5.js} +21 -21
  12. package/dist/cli/auth-6EIEZ3UE.js +43 -0
  13. package/dist/cli/{auth-BVCHIFKH.mjs → auth-RSS7MOBV.mjs} +7 -7
  14. package/dist/cli/{billing-DUKPCJD5.mjs → billing-2ALO3XEG.mjs} +10 -10
  15. package/dist/cli/{billing-APS3ELBH.js → billing-RCC6WBIZ.js} +93 -93
  16. package/dist/cli/{chunk-N43XH6VY.mjs → chunk-2YEFJHAF.mjs} +3 -3
  17. package/dist/cli/{chunk-TTH5IEHD.js → chunk-4IIK6GIY.js} +17 -17
  18. package/dist/cli/{chunk-FVWUNN6J.mjs → chunk-5NU37KME.mjs} +2 -2
  19. package/dist/cli/{chunk-T6XPF7AP.mjs → chunk-6ADGVZRX.mjs} +5 -5
  20. package/dist/cli/{chunk-RNSHCJME.js → chunk-6Y3DDRRN.js} +30 -30
  21. package/dist/cli/{chunk-LVVWOMK6.js → chunk-6ZLL5GDN.js} +2 -2
  22. package/dist/cli/{chunk-RPXW5XUC.js → chunk-72L5HQ3J.js} +5 -5
  23. package/dist/cli/{chunk-QPA3ZG56.mjs → chunk-72MFP7V4.mjs} +1 -1
  24. package/dist/cli/{chunk-UBY2MSP4.js → chunk-7R2V5Z6O.js} +41 -41
  25. package/dist/cli/{chunk-MMZO25CN.mjs → chunk-C2SR3X7Y.mjs} +4 -4
  26. package/dist/cli/{chunk-R5RWDO75.mjs → chunk-C72J6JE3.mjs} +1 -1
  27. package/dist/cli/{chunk-Z6PDSCJ3.mjs → chunk-CA24C3XL.mjs} +4 -4
  28. package/dist/cli/{chunk-M4DZLI3T.js → chunk-CKEZXNMV.js} +6 -6
  29. package/dist/cli/{chunk-C24VEYSP.js → chunk-D4OZSC3C.js} +8 -4
  30. package/dist/cli/{chunk-LXOMP5AZ.mjs → chunk-E7ZM2ZRD.mjs} +5 -5
  31. package/dist/cli/{chunk-2T6ZOAXX.mjs → chunk-EYWP5JPU.mjs} +4 -4
  32. package/dist/cli/{chunk-BX5N4YT4.js → chunk-FIIBDWAO.js} +55 -55
  33. package/dist/cli/{chunk-7MJYZ33I.mjs → chunk-GJYLC4JB.mjs} +1 -1
  34. package/dist/cli/{chunk-NP6FLJ75.mjs → chunk-H6BSB2YJ.mjs} +1 -1
  35. package/dist/cli/{chunk-N4TR6QRI.mjs → chunk-HT675XNR.mjs} +1 -1
  36. package/dist/cli/{chunk-ODJS43GU.mjs → chunk-HY6KAW5H.mjs} +5 -5
  37. package/dist/cli/{chunk-2SG4MRCI.mjs → chunk-J4VMWSQK.mjs} +7 -7
  38. package/dist/cli/{chunk-NTWNM5IW.js → chunk-JB6FEEDQ.js} +2 -2
  39. package/dist/cli/{chunk-EA775NLJ.mjs → chunk-JPLEDOEW.mjs} +2 -2
  40. package/dist/cli/{chunk-RK5V6MFG.mjs → chunk-LCKAG5RL.mjs} +2 -2
  41. package/dist/cli/{chunk-5YFBVXFQ.mjs → chunk-LWUFEX26.mjs} +3 -3
  42. package/dist/cli/{chunk-JUCUJFBH.js → chunk-LZROM6VQ.js} +2 -2
  43. package/dist/cli/{chunk-Z7YEZWP3.js → chunk-N6Q5SDGA.js} +44 -44
  44. package/dist/cli/{chunk-A6QCMBGL.js → chunk-NRO3NTVO.js} +5 -5
  45. package/dist/cli/{chunk-DEGOD6EH.js → chunk-P6AADORO.js} +3 -3
  46. package/dist/cli/{chunk-JMPBBVRF.js → chunk-PKKSXXZ5.js} +26 -26
  47. package/dist/cli/{chunk-HSESQ4OG.js → chunk-PMS3LQ6B.js} +5 -5
  48. package/dist/cli/{chunk-GESSUOYZ.js → chunk-PPYJXP4Z.js} +22 -22
  49. package/dist/cli/{chunk-62PFEEX3.mjs → chunk-PVVWKOEB.mjs} +8 -7
  50. package/dist/cli/{chunk-ZL4C3NPO.mjs → chunk-Q47MAAHI.mjs} +1 -1
  51. package/dist/cli/{chunk-ZEZAFOH3.js → chunk-QG3MRMU5.js} +58 -57
  52. package/dist/cli/{chunk-CB4ZU276.mjs → chunk-QG4LIOGI.mjs} +2 -2
  53. package/dist/cli/{chunk-4QF2K7TM.mjs → chunk-QNHHZ63P.mjs} +1 -1
  54. package/dist/cli/{chunk-FGKQ2MVA.js → chunk-QUSYG3VP.js} +8 -8
  55. package/dist/cli/{chunk-BSR56POG.js → chunk-QX7WDG4V.js} +11 -11
  56. package/dist/cli/{chunk-F6OXFG5K.js → chunk-RB3OR32I.js} +16 -16
  57. package/dist/cli/{chunk-FHJTOHSE.mjs → chunk-RB5EMAWD.mjs} +1 -1
  58. package/dist/cli/{chunk-4H3XE5OX.js → chunk-RLI6FDQM.js} +6 -6
  59. package/dist/cli/{chunk-TMQUMILM.js → chunk-RVHUW4TN.js} +2 -2
  60. package/dist/cli/{chunk-DIAWYWT5.js → chunk-SQWET4SL.js} +18 -1
  61. package/dist/cli/{chunk-OZDT2CZW.mjs → chunk-STR5LXK4.mjs} +1 -1
  62. package/dist/cli/{chunk-ALJJRZNJ.js → chunk-T2N3B7IQ.js} +8 -8
  63. package/dist/cli/{chunk-CZLYC62O.js → chunk-TZNQRKDF.js} +1 -1
  64. package/dist/cli/{chunk-DWASXQF6.js → chunk-UW5QWTUG.js} +19 -19
  65. package/dist/cli/{chunk-TX4OUEUU.mjs → chunk-V46UBZBJ.mjs} +6 -3
  66. package/dist/cli/{chunk-4FN4WVGL.js → chunk-VIZJIBI4.js} +10 -10
  67. package/dist/cli/{chunk-TRJLHTHI.js → chunk-W5I53WQ4.js} +112 -112
  68. package/dist/cli/{chunk-6FM7YDHA.mjs → chunk-WCQ7JGDV.mjs} +4 -4
  69. package/dist/cli/{chunk-7TFAKDSD.js → chunk-WE223LFR.js} +19 -19
  70. package/dist/cli/{chunk-2AVO64J2.mjs → chunk-X2YP36YP.mjs} +1 -1
  71. package/dist/cli/{chunk-5I2L6VMP.js → chunk-XEQBYK4B.js} +16 -13
  72. package/dist/cli/{chunk-5TOFI5GC.js → chunk-YS7AI7R6.js} +108 -108
  73. package/dist/cli/{chunk-HJ5B67S3.mjs → chunk-YXGTO5XA.mjs} +8 -4
  74. package/dist/cli/{chunk-TYUC56PS.mjs → chunk-Z3KLCDCB.mjs} +5 -5
  75. package/dist/cli/{chunk-ZMFR4BKH.mjs → chunk-ZFRN3B2R.mjs} +2 -2
  76. package/dist/cli/{chunk-AC3YRA3Y.mjs → chunk-ZMCQP4EU.mjs} +11 -11
  77. package/dist/cli/{chunk-HBL4PM5Q.mjs → chunk-ZPGGW27Q.mjs} +17 -0
  78. package/dist/cli/command-docs.js +2 -2
  79. package/dist/cli/command-docs.mjs +1 -1
  80. package/dist/cli/{csv-L63HLRNM.js → csv-RPR64UBS.js} +15 -15
  81. package/dist/cli/{csv-NOYOCDAK.mjs → csv-YXK5TB47.mjs} +6 -6
  82. package/dist/cli/{db-UBQFFOTS.js → db-KO3JCGRG.js} +36 -36
  83. package/dist/cli/{db-637BNZ2B.mjs → db-UQYILAMF.mjs} +9 -9
  84. package/dist/cli/describe-BPX3U2BF.js +50 -0
  85. package/dist/cli/describe-P2OK5X2S.mjs +50 -0
  86. package/dist/cli/describe-core.d.mts +3 -3
  87. package/dist/cli/describe-core.d.ts +3 -3
  88. package/dist/cli/describe-core.js +4 -4
  89. package/dist/cli/describe-core.mjs +3 -3
  90. package/dist/cli/{executions-RNOBWJ3P.js → executions-5Z7H7HV3.js} +11 -11
  91. package/dist/cli/{executions-NGPKKOLW.mjs → executions-IQCRQXVA.mjs} +9 -9
  92. package/dist/cli/{feedback-7BHVKCY5.js → feedback-EDZJDARP.js} +12 -12
  93. package/dist/cli/{feedback-NREYHFEJ.mjs → feedback-ZO6A4HTV.mjs} +7 -7
  94. package/dist/cli/{git-DSTDRP3J.mjs → git-OBXSILWM.mjs} +7 -7
  95. package/dist/cli/git-Y34J73QC.js +25 -0
  96. package/dist/cli/index.js +150 -150
  97. package/dist/cli/index.mjs +46 -46
  98. package/dist/cli/{legacy-noops-TC7WNDQS.mjs → legacy-noops-4UJM3FMN.mjs} +8 -8
  99. package/dist/cli/{legacy-noops-VTNA7T4P.js → legacy-noops-HKXU2EU6.js} +11 -11
  100. package/dist/cli/{monitors-IC4NIUE5.js → monitors-7EP3Q2DX.js} +110 -110
  101. package/dist/cli/{monitors-YNQ6LYCY.mjs → monitors-ZXF2KCW7.mjs} +10 -10
  102. package/dist/cli/{org-MF2UEFK4.mjs → org-EDHCUR6V.mjs} +9 -9
  103. package/dist/cli/{org-B47C34FY.js → org-GFGOTUWP.js} +75 -75
  104. package/dist/cli/{pages-3EC54UPO.mjs → pages-EGEWMPJN.mjs} +9 -9
  105. package/dist/cli/{pages-A3JMHBHD.js → pages-TLFQQL5S.js} +21 -21
  106. package/dist/cli/{play-BLFSS42Z.mjs → play-NBO3MPDL.mjs} +22 -22
  107. package/dist/cli/{play-LAEAIGU4.js → play-XDHJY5R4.js} +392 -392
  108. package/dist/cli/{providers-PEXILFIA.mjs → providers-NXJ7WPNH.mjs} +9 -9
  109. package/dist/cli/{providers-XNC5JF3F.js → providers-RU6BGEDM.js} +12 -12
  110. package/dist/cli/{quickstart-XRU23BKT.js → quickstart-4ZZBMZPF.js} +8 -8
  111. package/dist/cli/{quickstart-E2PKFV2L.mjs → quickstart-YBNDPNAR.mjs} +6 -6
  112. package/dist/cli/{run-T7U6DRMZ.js → run-374CTJBV.js} +46 -46
  113. package/dist/cli/{run-5QI3H7HH.mjs → run-LX52KVZM.mjs} +27 -27
  114. package/dist/cli/{search-WLXLC3Z3.mjs → search-EH6JPV62.mjs} +11 -11
  115. package/dist/cli/search-YS4DHSQC.js +33 -0
  116. package/dist/cli/{search-output-7WXW6WZQ.js → search-output-NATLJOWW.js} +9 -9
  117. package/dist/cli/{search-output-HGO5JVJO.mjs → search-output-XIQERUHF.mjs} +7 -7
  118. package/dist/cli/{secrets-TTGCKS7Z.js → secrets-A3UXDE5V.js} +18 -18
  119. package/dist/cli/{secrets-ZYDUC6NU.mjs → secrets-VRJQFUKF.mjs} +9 -9
  120. package/dist/cli/sessions-5TTH5FGZ.mjs +18 -0
  121. package/dist/cli/sessions-EXII5VOV.js +18 -0
  122. package/dist/cli/{settings-LF43ODWF.js → settings-LX5EGLVT.js} +89 -89
  123. package/dist/cli/{settings-YA3ZNWZA.mjs → settings-VRGFTOTJ.mjs} +16 -16
  124. package/dist/cli/{setup-26D6ZPSI.mjs → setup-FXP5Y3Y6.mjs} +12 -12
  125. package/dist/cli/{setup-XBY4GXCA.js → setup-QL4YWKOR.js} +52 -52
  126. package/dist/cli/skills-5L4CYX3V.js +37 -0
  127. package/dist/cli/{skills-LYPZTDUL.mjs → skills-ET4PMBJE.mjs} +10 -10
  128. package/dist/cli/tools-5V77VIUA.js +57 -0
  129. package/dist/cli/{tools-5JNLULNK.mjs → tools-WPL3NZAA.mjs} +20 -20
  130. package/dist/cli/update-G5RSSWM5.js +35 -0
  131. package/dist/cli/{update-UIO6RHIB.mjs → update-OCAHAKL2.mjs} +12 -12
  132. package/dist/cli/{workflow-UQ2S2X42.js → workflow-CWO3XL4O.js} +20 -20
  133. package/dist/cli/{workflow-H5UVEIGG.mjs → workflow-NPZ2RLQG.mjs} +10 -10
  134. package/dist/{client-CmlKSBXd.d.ts → client-CQSPuqxh.d.ts} +1 -1
  135. package/dist/{client-By7bUS8h.d.mts → client-K1g4ab5Y.d.mts} +1 -1
  136. package/dist/{client-core-BZ3tpY_J.d.mts → client-core-BksGf5Gd.d.mts} +1 -1
  137. package/dist/{client-core-BM0mKhgp.d.ts → client-core-BlaqOlQ7.d.ts} +1 -1
  138. package/dist/{compiler-manifest-BeURaD5Y.d.mts → compiler-manifest-BliMS7ax.d.mts} +14 -1
  139. package/dist/{compiler-manifest-BeURaD5Y.d.ts → compiler-manifest-BliMS7ax.d.ts} +14 -1
  140. package/dist/{errors-kBuT4kGK.d.mts → errors-BZ6Zq1cz.d.mts} +1 -1
  141. package/dist/{errors-BoPXPrSy.d.ts → errors-xfNscfS1.d.ts} +1 -1
  142. package/dist/{index-DC7oRAAC.d.mts → index-DbvCg4zg.d.mts} +1 -1
  143. package/dist/{index-D0crdGM1.d.ts → index-FGdQv8J8.d.ts} +1 -1
  144. package/dist/index.d.mts +7 -7
  145. package/dist/index.d.ts +7 -7
  146. package/dist/index.js +13 -13
  147. package/dist/index.mjs +9 -9
  148. package/dist/install-integrity.json +126 -126
  149. package/dist/plays/bundle-play-file.d.mts +3 -3
  150. package/dist/plays/bundle-play-file.d.ts +3 -3
  151. package/dist/plays/bundle-play-file.mjs +1 -1
  152. package/dist/plays/csv-data-input.js +3 -3
  153. package/dist/plays/csv-data-input.mjs +2 -2
  154. package/dist/plays/play-description.d.mts +2 -2
  155. package/dist/plays/play-description.d.ts +2 -2
  156. package/dist/plays/run-request.d.mts +2 -2
  157. package/dist/plays/run-request.d.ts +2 -2
  158. package/dist/plays/run-request.js +3 -3
  159. package/dist/plays/run-request.mjs +2 -2
  160. package/dist/release.d.mts +1 -1
  161. package/dist/release.d.ts +1 -1
  162. package/dist/release.js +2 -2
  163. package/dist/release.mjs +1 -1
  164. package/dist/server.d.mts +4 -4
  165. package/dist/server.d.ts +4 -4
  166. package/dist/server.js +12 -12
  167. package/dist/server.mjs +6 -6
  168. package/package.json +1 -1
  169. package/dist/cli/auth-VYECQ6PI.js +0 -43
  170. package/dist/cli/describe-C7FBGVGM.js +0 -50
  171. package/dist/cli/describe-KAUMYSRG.mjs +0 -50
  172. package/dist/cli/git-XTEKRVO3.js +0 -25
  173. package/dist/cli/search-A6HYC5XI.js +0 -33
  174. package/dist/cli/sessions-3KMK76O3.mjs +0 -18
  175. package/dist/cli/sessions-5X4PTBB6.js +0 -18
  176. package/dist/cli/skills-ZA7YZBQC.js +0 -37
  177. package/dist/cli/tools-LBDNLH4V.js +0 -57
  178. package/dist/cli/update-CEH2LRAC.js +0 -35
@@ -3,18 +3,18 @@
3
3
  var _chunkD3BCSAN7js = require('./chunk-D3BCSAN7.js');
4
4
 
5
5
 
6
- var _chunkHSESQ4OGjs = require('./chunk-HSESQ4OG.js');
6
+ var _chunkPMS3LQ6Bjs = require('./chunk-PMS3LQ6B.js');
7
7
 
8
8
 
9
- var _chunkDWASXQF6js = require('./chunk-DWASXQF6.js');
9
+ var _chunkUW5QWTUGjs = require('./chunk-UW5QWTUG.js');
10
10
 
11
11
 
12
12
 
13
- var _chunk5I2L6VMPjs = require('./chunk-5I2L6VMP.js');
13
+ var _chunkXEQBYK4Bjs = require('./chunk-XEQBYK4B.js');
14
14
 
15
15
 
16
16
 
17
- var _chunkFGKQ2MVAjs = require('./chunk-FGKQ2MVA.js');
17
+ var _chunkQUSYG3VPjs = require('./chunk-QUSYG3VP.js');
18
18
 
19
19
  // src/cli/commands/search.ts
20
20
  var _commander = require('commander');
@@ -24,7 +24,7 @@ var _fs = require('fs');
24
24
  var _path = require('path');
25
25
  var SEARCH_REF_TTL_MS = 15 * 6e4;
26
26
  function lastSearchPath() {
27
- return _path.join.call(void 0, _chunkFGKQ2MVAjs.sdkCliStateDirPath.call(void 0, _chunkFGKQ2MVAjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
27
+ return _path.join.call(void 0, _chunkQUSYG3VPjs.sdkCliStateDirPath.call(void 0, _chunkQUSYG3VPjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
28
28
  }
29
29
  function rememberSearchRef(searchRef) {
30
30
  writeSearchRefs({ searchRef });
@@ -134,9 +134,9 @@ async function runSearch(queryInputs, options, types, exclude = []) {
134
134
  console.error("--summary-width must be an integer of at least 2.");
135
135
  return 1;
136
136
  }
137
- const client = new (0, _chunkHSESQ4OGjs.DeeplineClient)();
137
+ const client = new (0, _chunkPMS3LQ6Bjs.DeeplineClient)();
138
138
  const json = options.json === true;
139
- const renderer = json ? void 0 : await Promise.resolve().then(() => _interopRequireWildcard(require("./search-output-7WXW6WZQ.js")));
139
+ const renderer = json ? void 0 : await Promise.resolve().then(() => _interopRequireWildcard(require("./search-output-NATLJOWW.js")));
140
140
  const searches = [];
141
141
  const chunks = [];
142
142
  const refs = /* @__PURE__ */ new Map();
@@ -159,7 +159,7 @@ async function runSearch(queryInputs, options, types, exclude = []) {
159
159
  const text = _optionalChain([renderer, 'optionalAccess', _12 => _12.renderSearchResults, 'call', _13 => _13(result, summaryWidth)]);
160
160
  if (!multiple) {
161
161
  if (searchRef) rememberSearchRef(searchRef);
162
- _chunk5I2L6VMPjs.printCommandEnvelope.call(void 0, result, { json, text });
162
+ _chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0, result, { json, text });
163
163
  return 0;
164
164
  }
165
165
  searches.push({ ...result, query });
@@ -173,8 +173,8 @@ ${text}`);
173
173
  }
174
174
  } catch (error) {
175
175
  if (!multiple) throw error;
176
- const payload = _chunk5I2L6VMPjs.errorToJsonPayload.call(void 0, error);
177
- const queryExitCode = _nullishCoalesce(payload.exitCode, () => ( _chunkDWASXQF6js.resolveSdkCliFailureExitCode.call(void 0, error)));
176
+ const payload = _chunkXEQBYK4Bjs.errorToJsonPayload.call(void 0, error);
177
+ const queryExitCode = _nullishCoalesce(payload.exitCode, () => ( _chunkUW5QWTUGjs.resolveSdkCliFailureExitCode.call(void 0, error)));
178
178
  searches.push({ ...payload, query, exitCode: queryExitCode });
179
179
  if (!json) {
180
180
  console.error(`${JSON.stringify(query)}: ${payload.error.message}`);
@@ -186,7 +186,7 @@ Search failed.
186
186
  }
187
187
  }
188
188
  rememberSearchRefsByTool(refs);
189
- _chunk5I2L6VMPjs.printCommandEnvelope.call(void 0,
189
+ _chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
190
190
  { searches },
191
191
  {
192
192
  json,
@@ -1,19 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkLVVWOMK6js = require('./chunk-LVVWOMK6.js');
4
+ var _chunk6ZLL5GDNjs = require('./chunk-6ZLL5GDN.js');
5
5
 
6
6
 
7
- var _chunkUBY2MSP4js = require('./chunk-UBY2MSP4.js');
7
+ var _chunk7R2V5Z6Ojs = require('./chunk-7R2V5Z6O.js');
8
8
 
9
9
 
10
- var _chunkZ7YEZWP3js = require('./chunk-Z7YEZWP3.js');
10
+ var _chunkN6Q5SDGAjs = require('./chunk-N6Q5SDGA.js');
11
11
 
12
12
 
13
- var _chunk5I2L6VMPjs = require('./chunk-5I2L6VMP.js');
13
+ var _chunkXEQBYK4Bjs = require('./chunk-XEQBYK4B.js');
14
14
 
15
15
 
16
- var _chunkFGKQ2MVAjs = require('./chunk-FGKQ2MVA.js');
16
+ var _chunkQUSYG3VPjs = require('./chunk-QUSYG3VP.js');
17
17
 
18
18
  // src/cli/commands/update.ts
19
19
  var _child_process = require('child_process');
@@ -495,7 +495,7 @@ function normalizedNpmPrefix(value) {
495
495
  }
496
496
  function resolveNpmGlobalPrefix(env) {
497
497
  try {
498
- const plan = _chunkZ7YEZWP3js.resolveShellSpawn.call(void 0,
498
+ const plan = _chunkN6Q5SDGAjs.resolveShellSpawn.call(void 0,
499
499
  "npm",
500
500
  ["prefix", "-g"],
501
501
  process.platform,
@@ -556,8 +556,8 @@ function resolveUpdatePlan(options = {}) {
556
556
  const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
557
557
  const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
558
558
  const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
559
- const npmVersion = options.npmVersion === void 0 ? _chunkLVVWOMK6js.readNpmVersion.call(void 0, env) : options.npmVersion;
560
- const npmGlobalInstallFlags = _chunkLVVWOMK6js.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
559
+ const npmVersion = options.npmVersion === void 0 ? _chunk6ZLL5GDNjs.readNpmVersion.call(void 0, env) : options.npmVersion;
560
+ const npmGlobalInstallFlags = _chunk6ZLL5GDNjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
561
561
  const args = installPrefix ? [
562
562
  "install",
563
563
  "-g",
@@ -567,7 +567,7 @@ function resolveUpdatePlan(options = {}) {
567
567
  packageSpec
568
568
  ] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
569
569
  const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
570
- _optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunkFGKQ2MVAjs.autoDetectBaseUrl.call(void 0, )
570
+ _optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunkQUSYG3VPjs.autoDetectBaseUrl.call(void 0, )
571
571
  );
572
572
  return {
573
573
  kind: "npm-global",
@@ -816,7 +816,7 @@ function sidecarInstallFailure(versionDir) {
816
816
  function runCommand(command, args, env = process.env) {
817
817
  return new Promise((resolveResult) => {
818
818
  let output = "";
819
- const plan = _chunkZ7YEZWP3js.resolveShellSpawn.call(void 0, command, args, process.platform, env);
819
+ const plan = _chunkN6Q5SDGAjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
820
820
  const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
821
821
  stdio: ["inherit", "pipe", "pipe"],
822
822
  shell: plan.shell,
@@ -1199,14 +1199,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
1199
1199
  throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
1200
1200
  }
1201
1201
  async function runUpdateCommand(options, dependencies = {}) {
1202
- const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkFGKQ2MVAjs.autoDetectBaseUrl));
1202
+ const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkQUSYG3VPjs.autoDetectBaseUrl));
1203
1203
  const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
1204
1204
  const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
1205
1205
  const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
1206
1206
  const originalWrite = process.stdout.write.bind(process.stdout);
1207
1207
  process.stdout.write = (() => true);
1208
1208
  try {
1209
- const exitCode = await _chunkUBY2MSP4js.runSkillsCommand.call(void 0, { json: true });
1209
+ const exitCode = await _chunk7R2V5Z6Ojs.runSkillsCommand.call(void 0, { json: true });
1210
1210
  if (exitCode !== 0) {
1211
1211
  throw new Error(
1212
1212
  `Deepline skills update failed with exit ${exitCode}.`
@@ -1277,11 +1277,11 @@ async function runUpdateCommand(options, dependencies = {}) {
1277
1277
  ]
1278
1278
  };
1279
1279
  if (options.json && !options.executeWithJson) {
1280
- _chunk5I2L6VMPjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
1280
+ _chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
1281
1281
  return 0;
1282
1282
  }
1283
1283
  if (options.printCommand) {
1284
- _chunk5I2L6VMPjs.printCommandEnvelope.call(void 0,
1284
+ _chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
1285
1285
  {
1286
1286
  ...plan,
1287
1287
  render: {
@@ -1294,7 +1294,7 @@ async function runUpdateCommand(options, dependencies = {}) {
1294
1294
  return 0;
1295
1295
  }
1296
1296
  if (plan.kind === "source" || plan.kind === "homebrew") {
1297
- _chunk5I2L6VMPjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
1297
+ _chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
1298
1298
  return 0;
1299
1299
  }
1300
1300
  stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
@@ -1324,7 +1324,7 @@ To retry with full installer output, run: deepline skills install
1324
1324
  );
1325
1325
  }
1326
1326
  if (options.executeWithJson && options.json) {
1327
- _chunk5I2L6VMPjs.printCommandEnvelope.call(void 0,
1327
+ _chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
1328
1328
  {
1329
1329
  ok: true,
1330
1330
  pinnedVersion
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveShellSpawn
3
- } from "./chunk-TYUC56PS.mjs";
3
+ } from "./chunk-Z3KLCDCB.mjs";
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  import { spawnSync } from "child_process";
@@ -8,7 +8,7 @@ var _chunkNTLBZUHDjs = require('./chunk-NTLBZUHD.js');
8
8
 
9
9
 
10
10
 
11
- var _chunk5I2L6VMPjs = require('./chunk-5I2L6VMP.js');
11
+ var _chunkXEQBYK4Bjs = require('./chunk-XEQBYK4B.js');
12
12
 
13
13
  // src/cli/describe-options.ts
14
14
  function addDescribeOptions(command, options = {}) {
@@ -249,7 +249,7 @@ function projectRunDatasetCell(value) {
249
249
  const logicalValue = parseSerializedDatasetValue(value);
250
250
  if (logicalValue === null || logicalValue === void 0) return logicalValue;
251
251
  if (typeof logicalValue === "object") {
252
- return _chunk5I2L6VMPjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
252
+ return _chunkXEQBYK4Bjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
253
253
  }
254
254
  return logicalValue;
255
255
  }
@@ -641,7 +641,7 @@ function csvText(rows, columns = []) {
641
641
  rows: rows.map((row) => record(row) ? row : { value: row }),
642
642
  columns
643
643
  });
644
- return _chunk5I2L6VMPjs.csvStringFromRows.call(void 0, projection.rows, projection.columns);
644
+ return _chunkXEQBYK4Bjs.csvStringFromRows.call(void 0, projection.rows, projection.columns);
645
645
  }
646
646
  function writeExecutionOutput(result, options, { skipReceiptFile = false } = {}) {
647
647
  let temp;
@@ -768,7 +768,7 @@ function writeExecutionOutput(result, options, { skipReceiptFile = false } = {})
768
768
  };
769
769
  if (options.receiptOut && !skipReceiptFile) {
770
770
  persist(options.receiptOut, jsonText(receipt));
771
- _chunk5I2L6VMPjs.markJsonOutputHandled.call(void 0, );
771
+ _chunkXEQBYK4Bjs.markJsonOutputHandled.call(void 0, );
772
772
  } else {
773
773
  printReceipt(receipt, options, {
774
774
  data: hasData ? result.data : void 0,
@@ -1027,8 +1027,8 @@ function printReceipt(receipt, options, extra) {
1027
1027
  const text = options.receiptJson ? `${JSON.stringify(receipt, null, 2)}
1028
1028
  ` : receiptText(receipt, options, extra);
1029
1029
  if (options.receiptOut !== void 0) {
1030
- _chunk5I2L6VMPjs.writeRawStderr.call(void 0, text);
1031
- _chunk5I2L6VMPjs.markJsonOutputHandled.call(void 0, );
1030
+ _chunkXEQBYK4Bjs.writeRawStderr.call(void 0, text);
1031
+ _chunkXEQBYK4Bjs.markJsonOutputHandled.call(void 0, );
1032
1032
  } else {
1033
1033
  (dataOnStdout(options) ? process.stderr : process.stdout).write(text);
1034
1034
  }
@@ -16,7 +16,7 @@ var _chunkBN5VKY4Xjs = require('./chunk-BN5VKY4X.js');
16
16
  var _chunkNTLBZUHDjs = require('./chunk-NTLBZUHD.js');
17
17
 
18
18
 
19
- var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
19
+ var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
20
20
 
21
21
  // src/cli/tool-features.ts
22
22
  var VIEWS = {
@@ -100,7 +100,7 @@ async function found(lookup) {
100
100
  try {
101
101
  return await lookup;
102
102
  } catch (error) {
103
- if (error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.code === "PLAY_NOT_FOUND" || error.code === "NOT_FOUND")) {
103
+ if (error instanceof _chunkSQWET4SLjs.DeeplineError && (error.statusCode === 404 || error.code === "PLAY_NOT_FOUND" || error.code === "NOT_FOUND")) {
104
104
  return null;
105
105
  }
106
106
  throw error;
@@ -32,6 +32,21 @@ function applyBrand(value, brand) {
32
32
  value: true
33
33
  });
34
34
  }
35
+ function readToolUpstreamResponse(value) {
36
+ if (!isRecord(value)) return void 0;
37
+ const raw = isRecord(value.toolResponse) ? value.toolResponse.rawV2 : null;
38
+ const upstream = _nullishCoalesce(value.upstreamResponse, () => ( (isRecord(raw) ? raw.upstreamResponse : null)));
39
+ if (!isRecord(upstream) || typeof upstream.status !== "number" || !Number.isInteger(upstream.status) || upstream.status < 100 || upstream.status > 599 || !Object.hasOwn(upstream, "body"))
40
+ return void 0;
41
+ return { status: upstream.status, body: upstream.body };
42
+ }
43
+ function attachToolUpstreamResponse(error, response) {
44
+ const upstream = readToolUpstreamResponse(response);
45
+ if (upstream) {
46
+ Object.defineProperty(error, "upstreamResponse", { value: upstream });
47
+ }
48
+ return error;
49
+ }
35
50
  var DeeplineError = class _DeeplineError extends Error {
36
51
  /** HTTP status when the failure crossed an HTTP boundary. */
37
52
 
@@ -351,4 +366,6 @@ function deserializeToolExecutionFailure(message, value, acceptedSchemaVersion)
351
366
 
352
367
 
353
368
 
354
- exports.TOOL_EXECUTION_ERROR_SCHEMA_VERSION = TOOL_EXECUTION_ERROR_SCHEMA_VERSION; exports.SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS = SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS; exports.TOOL_EXECUTION_ERROR_SCHEMA_HEADER = TOOL_EXECUTION_ERROR_SCHEMA_HEADER; exports.DeeplineError = DeeplineError; exports.ToolExecutionError = ToolExecutionError; exports.brandAsToolExecutionError = brandAsToolExecutionError; exports.isProviderTransientFailure = isProviderTransientFailure; exports.ProviderTransientError = ProviderTransientError; exports.getProviderUnavailableReason = getProviderUnavailableReason; exports.isProviderUnavailable = isProviderUnavailable; exports.isProviderWaterfallUnavailableError = isProviderWaterfallUnavailableError; exports.brandAsProviderTransientError = brandAsProviderTransientError; exports.serializeToolExecutionFailure = serializeToolExecutionFailure; exports.deserializeToolExecutionFailure = deserializeToolExecutionFailure;
369
+
370
+
371
+ exports.TOOL_EXECUTION_ERROR_SCHEMA_VERSION = TOOL_EXECUTION_ERROR_SCHEMA_VERSION; exports.SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS = SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS; exports.TOOL_EXECUTION_ERROR_SCHEMA_HEADER = TOOL_EXECUTION_ERROR_SCHEMA_HEADER; exports.readToolUpstreamResponse = readToolUpstreamResponse; exports.attachToolUpstreamResponse = attachToolUpstreamResponse; exports.DeeplineError = DeeplineError; exports.ToolExecutionError = ToolExecutionError; exports.brandAsToolExecutionError = brandAsToolExecutionError; exports.isProviderTransientFailure = isProviderTransientFailure; exports.ProviderTransientError = ProviderTransientError; exports.getProviderUnavailableReason = getProviderUnavailableReason; exports.isProviderUnavailable = isProviderUnavailable; exports.isProviderWaterfallUnavailableError = isProviderWaterfallUnavailableError; exports.brandAsProviderTransientError = brandAsProviderTransientError; exports.serializeToolExecutionFailure = serializeToolExecutionFailure; exports.deserializeToolExecutionFailure = deserializeToolExecutionFailure;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DeeplineError
3
- } from "./chunk-HBL4PM5Q.mjs";
3
+ } from "./chunk-ZPGGW27Q.mjs";
4
4
 
5
5
  // node_modules/csv-parse/dist/esm/sync.js
6
6
  var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
@@ -3,10 +3,10 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
6
+ var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
7
7
 
8
8
  // src/errors.ts
9
- var CustomerDbQueryOutcomeUnknownError = (_class = class extends _chunkDIAWYWT5js.DeeplineError {
9
+ var CustomerDbQueryOutcomeUnknownError = (_class = class extends _chunkSQWET4SLjs.DeeplineError {
10
10
  __init() {this.outcome = "unknown"}
11
11
 
12
12
 
@@ -28,14 +28,14 @@ var CustomerDbQueryOutcomeUnknownError = (_class = class extends _chunkDIAWYWT5j
28
28
  Object.defineProperty(this, "cause", { value: cause, configurable: true });
29
29
  }
30
30
  }, _class);
31
- var AuthError = class extends _chunkDIAWYWT5js.DeeplineError {
31
+ var AuthError = class extends _chunkSQWET4SLjs.DeeplineError {
32
32
  /** Constructed by the SDK when Deepline rejects the caller's credentials. */
33
33
  constructor(message = "Authentication failed. Check your DEEPLINE_API_KEY.") {
34
34
  super(message, 401, "AUTH_ERROR");
35
35
  this.name = "AuthError";
36
36
  }
37
37
  };
38
- var RateLimitError = class extends _chunkDIAWYWT5js.DeeplineError {
38
+ var RateLimitError = class extends _chunkSQWET4SLjs.DeeplineError {
39
39
  /** Milliseconds to wait before retrying, from the `Retry-After` response header. Defaults to 5000. */
40
40
 
41
41
  /** Constructed by the SDK after exhausting HTTP-level rate-limit retries. */
@@ -89,13 +89,13 @@ var ToolRateLimitError = class extends RateLimitError {
89
89
  this.networkScope = options.networkScope;
90
90
  this.publicDetails = _nullishCoalesce(options.publicDetails, () => ( null));
91
91
  this.details = options.details;
92
- _chunkDIAWYWT5js.brandAsToolExecutionError.call(void 0, this);
93
- if (_chunkDIAWYWT5js.isProviderTransientFailure.call(void 0, this)) {
94
- _chunkDIAWYWT5js.brandAsProviderTransientError.call(void 0, this);
92
+ _chunkSQWET4SLjs.brandAsToolExecutionError.call(void 0, this);
93
+ if (_chunkSQWET4SLjs.isProviderTransientFailure.call(void 0, this)) {
94
+ _chunkSQWET4SLjs.brandAsProviderTransientError.call(void 0, this);
95
95
  }
96
96
  }
97
97
  };
98
- var ConfigError = class extends _chunkDIAWYWT5js.DeeplineError {
98
+ var ConfigError = class extends _chunkSQWET4SLjs.DeeplineError {
99
99
  /** Construct a local SDK configuration failure. */
100
100
  constructor(message) {
101
101
  super(message, void 0, "CONFIG_ERROR");
@@ -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.515",
52
+ version: "0.3.516",
53
53
  updateSummary: {
54
54
  introducedIn: "0.3.90",
55
55
  summary: "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."
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkFGKQ2MVAjs = require('./chunk-FGKQ2MVA.js');
4
+ var _chunkQUSYG3VPjs = require('./chunk-QUSYG3VP.js');
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _chunkZEZAFOH3js = require('./chunk-ZEZAFOH3.js');
10
+ var _chunkQG3MRMU5js = require('./chunk-QG3MRMU5.js');
11
11
 
12
12
 
13
- var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
13
+ var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
14
14
 
15
15
  // src/cli/failure-reporting.ts
16
16
  var _os = require('os');
@@ -138,7 +138,7 @@ function classifyNetworkCauseCategory(error) {
138
138
  }
139
139
  function isNetworkFailure(error) {
140
140
  if (!(error instanceof Error)) return false;
141
- if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.statusCode) return false;
141
+ if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.statusCode) return false;
142
142
  const code = classifyNetworkFailure(error);
143
143
  return code !== "network_error" || /unable to connect|unable to stream/i.test(error.message);
144
144
  }
@@ -150,7 +150,7 @@ function buildEnvironmentContext() {
150
150
  node_version: process.version,
151
151
  runtime: "Node.js",
152
152
  hostname: _os.hostname.call(void 0, ),
153
- agent_runtime: _chunkZEZAFOH3js.detectAgentRuntime.call(void 0, )
153
+ agent_runtime: _chunkQG3MRMU5js.detectAgentRuntime.call(void 0, )
154
154
  };
155
155
  for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
156
156
  const normalized = _optionalChain([process, 'access', _5 => _5.env, 'access', _6 => _6[key], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);
@@ -171,18 +171,18 @@ function buildEnvironmentContext() {
171
171
  return context;
172
172
  }
173
173
  function failureReportHeaders(apiKey) {
174
- const agentSessionId = _chunkZEZAFOH3js.agentSessionIdFromEnvironment.call(void 0, );
174
+ const agentSessionId = _chunkQG3MRMU5js.agentSessionIdFromEnvironment.call(void 0, );
175
175
  return {
176
- ..._chunkZEZAFOH3js.deploymentProtectionHeaders.call(void 0, ),
176
+ ..._chunkQG3MRMU5js.deploymentProtectionHeaders.call(void 0, ),
177
177
  ...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
178
178
  Authorization: `Bearer ${apiKey}`,
179
179
  "Content-Type": "application/json",
180
- "User-Agent": `deepline-ts-sdk/${_chunkZEZAFOH3js.SDK_VERSION}`,
180
+ "User-Agent": `deepline-ts-sdk/${_chunkQG3MRMU5js.SDK_VERSION}`,
181
181
  "X-Deepline-Client-Family": "sdk",
182
182
  "X-Deepline-CLI-Family": "sdk",
183
- "X-Deepline-Agent-Runtime": _chunkZEZAFOH3js.detectAgentRuntime.call(void 0, ),
184
- "X-Deepline-CLI-Version": _chunkZEZAFOH3js.SDK_VERSION,
185
- "X-Deepline-SDK-Version": _chunkZEZAFOH3js.SDK_VERSION
183
+ "X-Deepline-Agent-Runtime": _chunkQG3MRMU5js.detectAgentRuntime.call(void 0, ),
184
+ "X-Deepline-CLI-Version": _chunkQG3MRMU5js.SDK_VERSION,
185
+ "X-Deepline-SDK-Version": _chunkQG3MRMU5js.SDK_VERSION
186
186
  };
187
187
  }
188
188
  async function postFailureReport(input) {
@@ -210,7 +210,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
210
210
  if (isFailureReportingDisabled()) return false;
211
211
  let apiKey = "";
212
212
  try {
213
- apiKey = _chunkFGKQ2MVAjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
213
+ apiKey = _chunkQUSYG3VPjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
214
214
  } catch (e2) {
215
215
  return false;
216
216
  }
@@ -237,7 +237,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
237
237
  failure_code: failureCode2,
238
238
  failure_stage: failureStage,
239
239
  error_body: "Automatic Deepline skills installation failed.",
240
- cli_version: _chunkZEZAFOH3js.SDK_VERSION,
240
+ cli_version: _chunkQG3MRMU5js.SDK_VERSION,
241
241
  context: {
242
242
  environment: buildEnvironmentContext(),
243
243
  skills_sync: {
@@ -268,7 +268,7 @@ function commandTokens(argv) {
268
268
  }
269
269
  function isServerLoggedPlayRunStartFailure(input) {
270
270
  const [subcommand, command] = commandTokens(input.argv);
271
- return subcommand === "plays" && command === "run" && input.error instanceof _chunkDIAWYWT5js.DeeplineError && typeof input.error.statusCode === "number";
271
+ return subcommand === "plays" && command === "run" && input.error instanceof _chunkSQWET4SLjs.DeeplineError && typeof input.error.statusCode === "number";
272
272
  }
273
273
  function shouldReport(input) {
274
274
  if (input.error !== void 0) return true;
@@ -278,7 +278,7 @@ function failureCode(input) {
278
278
  if (input.error !== void 0) {
279
279
  if (isNetworkFailure(input.error))
280
280
  return classifyNetworkFailure(input.error);
281
- if (input.error instanceof _chunkDIAWYWT5js.DeeplineError && input.error.code) {
281
+ if (input.error instanceof _chunkSQWET4SLjs.DeeplineError && input.error.code) {
282
282
  return input.error.code;
283
283
  }
284
284
  if (input.error instanceof Error && input.error.name)
@@ -301,7 +301,7 @@ function resolvedFailureKind(input) {
301
301
  return input.error === void 0 ? "command_exit" : "uncaught_exception";
302
302
  }
303
303
  function safeRequestDiagnostics(error) {
304
- if (!(error instanceof _chunkDIAWYWT5js.DeeplineError)) return null;
304
+ if (!(error instanceof _chunkSQWET4SLjs.DeeplineError)) return null;
305
305
  const request = _optionalChain([error, 'access', _27 => _27.details, 'optionalAccess', _28 => _28.request]);
306
306
  if (!request || typeof request !== "object" || Array.isArray(request))
307
307
  return null;
@@ -357,7 +357,7 @@ function buildFailureReport(input) {
357
357
  failure_kind: failureKind,
358
358
  failure_code: code,
359
359
  failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
360
- cli_version: _chunkZEZAFOH3js.SDK_VERSION,
360
+ cli_version: _chunkQG3MRMU5js.SDK_VERSION,
361
361
  context: {
362
362
  base_url: redactFailureText(input.baseUrl, 400),
363
363
  command_summary: sanitizeCommand(input.argv),
@@ -377,8 +377,8 @@ async function maybeReportSdkCliFailure(input) {
377
377
  if (isServerLoggedPlayRunStartFailure(input)) return false;
378
378
  const exitCode = resolvedExitCode(input);
379
379
  if (!shouldReport({ exitCode, error: input.error })) return false;
380
- const baseUrl = _chunkFGKQ2MVAjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
381
- const apiKey = _chunkFGKQ2MVAjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
380
+ const baseUrl = _chunkQUSYG3VPjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
381
+ const apiKey = _chunkQUSYG3VPjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
382
382
  if (!apiKey) return false;
383
383
  return postFailureReport({
384
384
  baseUrl,
@@ -2,14 +2,15 @@ import {
2
2
  HttpClient,
3
3
  resolveCliCommandContext,
4
4
  resolveConfig
5
- } from "./chunk-ZMFR4BKH.mjs";
5
+ } from "./chunk-ZFRN3B2R.mjs";
6
6
  import {
7
7
  detectAgentRuntime
8
- } from "./chunk-62PFEEX3.mjs";
8
+ } from "./chunk-PVVWKOEB.mjs";
9
9
  import {
10
10
  DeeplineError,
11
+ readToolUpstreamResponse,
11
12
  serializeToolExecutionFailure
12
- } from "./chunk-HBL4PM5Q.mjs";
13
+ } from "./chunk-ZPGGW27Q.mjs";
13
14
 
14
15
  // src/cli/json-fields.ts
15
16
  var RUN_FIELDS = new Set(
@@ -922,6 +923,7 @@ function formatToolExecutionErrorDiagnostic(error) {
922
923
  function errorToJsonPayload(error) {
923
924
  const message = error instanceof Error ? error.message : String(error);
924
925
  const toolFailure = cliToolExecutionFailure(error);
926
+ const upstreamResponse = readToolUpstreamResponse(error);
925
927
  const maybeRecord = error && typeof error === "object" ? error : null;
926
928
  const code = typeof maybeRecord?.code === "string" ? maybeRecord.code : error instanceof SyntaxError ? "INVALID_JSON" : "CLI_ERROR";
927
929
  const details = {};
@@ -964,6 +966,7 @@ function errorToJsonPayload(error) {
964
966
  message,
965
967
  code,
966
968
  ...toolFailure ? { tool_error: toolFailure } : {},
969
+ ...upstreamResponse ? { upstreamResponse } : {},
967
970
  ...Object.keys(details).length > 0 ? { details } : {}
968
971
  }
969
972
  };
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkNTWNM5IWjs = require('./chunk-NTWNM5IW.js');
3
+ var _chunkJB6FEEDQjs = require('./chunk-JB6FEEDQ.js');
4
4
 
5
5
 
6
6
 
7
- var _chunk5I2L6VMPjs = require('./chunk-5I2L6VMP.js');
7
+ var _chunkXEQBYK4Bjs = require('./chunk-XEQBYK4B.js');
8
8
 
9
9
 
10
- var _chunkZEZAFOH3js = require('./chunk-ZEZAFOH3.js');
10
+ var _chunkQG3MRMU5js = require('./chunk-QG3MRMU5.js');
11
11
 
12
12
  // src/cli/commands/sessions.ts
13
13
 
@@ -142,7 +142,7 @@ function currentSessionFile(agent) {
142
142
  const newestFirst = listSessionFiles(agent).sort(
143
143
  (a, b) => b.mtimeMs - a.mtimeMs
144
144
  );
145
- const sessionId = _chunkZEZAFOH3js.agentSessionIdFromEnvironment.call(void 0,
145
+ const sessionId = _chunkQG3MRMU5js.agentSessionIdFromEnvironment.call(void 0,
146
146
  process.env,
147
147
  agent === "auto" ? void 0 : agent === "claude" ? "claude_code" : "codex"
148
148
  );
@@ -454,7 +454,7 @@ function buildSessionUploadContent(raw) {
454
454
  return { encodedContent: encoded, needsChunking: true };
455
455
  }
456
456
  async function uploadPayload(path, payload) {
457
- const { http } = _chunk5I2L6VMPjs.getAuthedHttpClient.call(void 0, );
457
+ const { http } = _chunkXEQBYK4Bjs.getAuthedHttpClient.call(void 0, );
458
458
  return await http.post(path, payload);
459
459
  }
460
460
  async function uploadChunkedSessions(sessions, options) {
@@ -487,7 +487,7 @@ async function uploadChunkedSessions(sessions, options) {
487
487
  ...options.rating ? { rating: options.rating } : {}
488
488
  });
489
489
  const sessionIds = sessions.map((session) => session.sessionId);
490
- _chunk5I2L6VMPjs.printCommandEnvelope.call(void 0,
490
+ _chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
491
491
  {
492
492
  ...response,
493
493
  ok: true,
@@ -508,7 +508,7 @@ async function uploadChunkedSessions(sessions, options) {
508
508
  );
509
509
  }
510
510
  async function handleSessionsSend(options) {
511
- if (_chunkNTWNM5IWjs.rejectRestrictedFeedback.call(void 0, options)) return;
511
+ if (_chunkJB6FEEDQjs.rejectRestrictedFeedback.call(void 0, options)) return;
512
512
  const rating = parseSessionRating(options.rating);
513
513
  if (options.file) {
514
514
  const filePath = _path.resolve.call(void 0, options.file);
@@ -520,7 +520,7 @@ async function handleSessionsSend(options) {
520
520
  filename: _path.basename.call(void 0, filePath),
521
521
  ...rating ? { rating } : {}
522
522
  });
523
- _chunk5I2L6VMPjs.printCommandEnvelope.call(void 0,
523
+ _chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
524
524
  {
525
525
  ...response2,
526
526
  ok: true,
@@ -570,7 +570,7 @@ async function handleSessionsSend(options) {
570
570
  ...rating ? { rating } : {}
571
571
  });
572
572
  const sessionIds = built.map((session) => session.sessionId);
573
- _chunk5I2L6VMPjs.printCommandEnvelope.call(void 0,
573
+ _chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
574
574
  {
575
575
  ...response,
576
576
  ok: true,
@@ -678,7 +678,7 @@ ${refreshMeta}
678
678
  </body>
679
679
  </html>`;
680
680
  _fs.writeFileSync.call(void 0, outputPath, html, "utf8");
681
- _chunk5I2L6VMPjs.printCommandEnvelope.call(void 0,
681
+ _chunkXEQBYK4Bjs.printCommandEnvelope.call(void 0,
682
682
  {
683
683
  ok: true,
684
684
  file: outputPath,