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
@@ -4,21 +4,21 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkF6OXFG5Kjs = require('./chunk-F6OXFG5K.js');
7
+ var _chunkRB3OR32Ijs = require('./chunk-RB3OR32I.js');
8
8
 
9
9
 
10
10
 
11
- var _chunkZ7YEZWP3js = require('./chunk-Z7YEZWP3.js');
11
+ var _chunkN6Q5SDGAjs = require('./chunk-N6Q5SDGA.js');
12
12
 
13
13
 
14
14
 
15
- var _chunk5I2L6VMPjs = require('./chunk-5I2L6VMP.js');
15
+ var _chunkXEQBYK4Bjs = require('./chunk-XEQBYK4B.js');
16
16
 
17
17
 
18
- var _chunkFGKQ2MVAjs = require('./chunk-FGKQ2MVA.js');
18
+ var _chunkQUSYG3VPjs = require('./chunk-QUSYG3VP.js');
19
19
 
20
20
 
21
- var _chunkZEZAFOH3js = require('./chunk-ZEZAFOH3.js');
21
+ var _chunkQG3MRMU5js = require('./chunk-QG3MRMU5.js');
22
22
 
23
23
  // src/cli/compatibility-catalog.ts
24
24
  var readers = /* @__PURE__ */ new WeakMap();
@@ -45,7 +45,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
45
45
  async function reportAutoUpdateEvent(input) {
46
46
  let apiKey = "";
47
47
  try {
48
- apiKey = _chunkFGKQ2MVAjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
48
+ apiKey = _chunkQUSYG3VPjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
49
49
  } catch (e2) {
50
50
  return;
51
51
  }
@@ -61,15 +61,15 @@ async function reportAutoUpdateEvent(input) {
61
61
  headers: {
62
62
  Authorization: `Bearer ${apiKey}`,
63
63
  "Content-Type": "application/json",
64
- "User-Agent": `deepline-ts-sdk/${_chunkZEZAFOH3js.SDK_VERSION}`,
64
+ "User-Agent": `deepline-ts-sdk/${_chunkQG3MRMU5js.SDK_VERSION}`,
65
65
  "X-Deepline-Client-Family": "sdk",
66
66
  "X-Deepline-CLI-Family": "sdk",
67
- "X-Deepline-CLI-Version": _chunkZEZAFOH3js.SDK_VERSION,
68
- "X-Deepline-SDK-Version": _chunkZEZAFOH3js.SDK_VERSION
67
+ "X-Deepline-CLI-Version": _chunkQG3MRMU5js.SDK_VERSION,
68
+ "X-Deepline-SDK-Version": _chunkQG3MRMU5js.SDK_VERSION
69
69
  },
70
70
  body: JSON.stringify({
71
71
  event: input.event,
72
- current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkZEZAFOH3js.SDK_VERSION,
72
+ current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkQG3MRMU5js.SDK_VERSION,
73
73
  target_version: input.response.latest,
74
74
  reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
75
75
  command: _nullishCoalesce(input.response.command, () => ( null)),
@@ -88,13 +88,13 @@ function envTruthy(name) {
88
88
  return value === "1" || value === "true" || value === "yes";
89
89
  }
90
90
  function shouldSkipSelfUpdate(policy) {
91
- return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkF6OXFG5Kjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkZ7YEZWP3js.isCiEnvironment.call(void 0, );
91
+ return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkRB3OR32Ijs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkN6Q5SDGAjs.isCiEnvironment.call(void 0, );
92
92
  }
93
93
  function isDowngradeAutoUpdateResponse(response) {
94
94
  const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
95
- const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkZEZAFOH3js.SDK_VERSION;
95
+ const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkQG3MRMU5js.SDK_VERSION;
96
96
  if (!target) return false;
97
- return _chunkF6OXFG5Kjs.compareUpdateVersions.call(void 0, target, current) < 0;
97
+ return _chunkRB3OR32Ijs.compareUpdateVersions.call(void 0, target, current) < 0;
98
98
  }
99
99
  function relaunchCurrentCommand(plan, runtime = {}) {
100
100
  return new Promise((resolve) => {
@@ -147,7 +147,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
147
147
  }
148
148
  if (isDowngradeAutoUpdateResponse(response)) {
149
149
  const target = response.latest;
150
- const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkZEZAFOH3js.SDK_VERSION;
150
+ const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkQG3MRMU5js.SDK_VERSION;
151
151
  process.stderr.write(
152
152
  `Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
153
153
  `
@@ -155,21 +155,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
155
155
  return false;
156
156
  }
157
157
  const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
158
- const plan = _chunkF6OXFG5Kjs.resolveUpdatePlan.call(void 0, {
158
+ const plan = _chunkRB3OR32Ijs.resolveUpdatePlan.call(void 0, {
159
159
  packageSpec,
160
160
  requireVerifiedNpmOwnership: true,
161
161
  npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
162
162
  });
163
- if (!_chunkF6OXFG5Kjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
163
+ if (!_chunkRB3OR32Ijs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
164
164
  return false;
165
165
  }
166
166
  if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
167
167
  deferredAutoUpdate = async () => {
168
168
  await applyAutoUpdate(response, baseUrl, plan, "next_command");
169
169
  };
170
- if (_chunk5I2L6VMPjs.isJsonOutputMode.call(void 0, )) {
170
+ if (_chunkXEQBYK4Bjs.isJsonOutputMode.call(void 0, )) {
171
171
  const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
172
- _chunk5I2L6VMPjs.addJsonNotice.call(void 0, {
172
+ _chunkXEQBYK4Bjs.addJsonNotice.call(void 0, {
173
173
  code: "sdk_update_queued",
174
174
  message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
175
175
  });
@@ -182,7 +182,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
182
182
  return true;
183
183
  }
184
184
  async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
185
- if (!_chunkF6OXFG5Kjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
185
+ if (!_chunkRB3OR32Ijs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
186
186
  const autoUpdate = response.auto_update;
187
187
  const label = _optionalChain([autoUpdate, 'optionalAccess', _32 => _32.reason]) === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : _optionalChain([autoUpdate, 'optionalAccess', _33 => _33.reason]) === "deprecated" ? "is deprecated and will update automatically" : _optionalChain([autoUpdate, 'optionalAccess', _34 => _34.required]) ? "requires an update" : "has an update available and will update automatically";
188
188
  process.stderr.write(
@@ -195,7 +195,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
195
195
  event: "started",
196
196
  installKind: plan.kind
197
197
  });
198
- const updateResult = await _chunkF6OXFG5Kjs.runAutomaticUpdatePlan.call(void 0, plan);
198
+ const updateResult = await _chunkRB3OR32Ijs.runAutomaticUpdatePlan.call(void 0, plan);
199
199
  if (updateResult.status === "skipped_previous_failure") {
200
200
  void reportAutoUpdateEvent({
201
201
  baseUrl,
@@ -233,7 +233,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
233
233
  exitCode: 0
234
234
  });
235
235
  try {
236
- await _chunkZ7YEZWP3js.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
236
+ await _chunkN6Q5SDGAjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
237
237
  mode: "detached",
238
238
  update: _optionalChain([response, 'access', _36 => _36.skills, 'optionalAccess', _37 => _37.requires_cli_update]) ? void 0 : response.skills,
239
239
  afterCliUpdate: {
@@ -260,7 +260,7 @@ var _crypto = require('crypto');
260
260
  var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
261
261
  var activeToolExecuteCommand = null;
262
262
  function progressLine(line) {
263
- if (!_chunk5I2L6VMPjs.isJsonOutputMode.call(void 0, )) console.error(line);
263
+ if (!_chunkXEQBYK4Bjs.isJsonOutputMode.call(void 0, )) console.error(line);
264
264
  }
265
265
  function beginToolExecuteCommand() {
266
266
  if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
@@ -2,7 +2,7 @@ import {
2
2
  AuthError,
3
3
  RateLimitError,
4
4
  ToolRateLimitError
5
- } from "./chunk-4QF2K7TM.mjs";
5
+ } from "./chunk-QNHHZ63P.mjs";
6
6
  import {
7
7
  apiErrorCodeFromResponse,
8
8
  apiErrorMessage
@@ -11,12 +11,13 @@ import {
11
11
  DeeplineError,
12
12
  TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
13
13
  ToolExecutionError,
14
+ attachToolUpstreamResponse,
14
15
  deserializeToolExecutionFailure,
15
16
  serializeToolExecutionFailure
16
- } from "./chunk-HBL4PM5Q.mjs";
17
+ } from "./chunk-ZPGGW27Q.mjs";
17
18
  import {
18
19
  SDK_RELEASE
19
- } from "./chunk-R5RWDO75.mjs";
20
+ } from "./chunk-C72J6JE3.mjs";
20
21
 
21
22
  // src/version.ts
22
23
  var SDK_VERSION = SDK_RELEASE.version;
@@ -508,9 +509,9 @@ var HttpClient = class {
508
509
  retryAfterDelayMs = retryAfter;
509
510
  break;
510
511
  }
511
- throw lastError;
512
+ throw attachToolUpstreamResponse(lastError, parsed);
512
513
  }
513
- throw structuredToolError;
514
+ throw attachToolUpstreamResponse(structuredToolError, parsed);
514
515
  }
515
516
  if (response.status === 429) {
516
517
  if (options?.preserveRateLimitResponse && isMonitorRateLimitEnvelope(parsed)) {
@@ -527,7 +528,7 @@ var HttpClient = class {
527
528
  retryAfterDelayMs = retryAfter;
528
529
  break;
529
530
  }
530
- throw lastError;
531
+ throw options?.toolId ? attachToolUpstreamResponse(lastError, parsed) : lastError;
531
532
  }
532
533
  if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
533
534
  throw new AuthError(apiErrorMessage(parsed, response.status));
@@ -565,7 +566,7 @@ var HttpClient = class {
565
566
  retryAfterDelayMs = parseOptionalRetryAfter(response);
566
567
  break;
567
568
  }
568
- throw lastError;
569
+ throw options?.toolId ? attachToolUpstreamResponse(lastError, parsed) : lastError;
569
570
  }
570
571
  if (typeof parsed === "string") {
571
572
  const interstitial = detectHtmlErrorBody(
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  printCommandEnvelope
3
- } from "./chunk-TX4OUEUU.mjs";
3
+ } from "./chunk-V46UBZBJ.mjs";
4
4
 
5
5
  // src/cli/feedback-preferences.ts
6
6
  import {
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
5
+ var _chunkT2N3B7IQjs = require('./chunk-T2N3B7IQ.js');
6
6
 
7
7
 
8
8
 
@@ -13,15 +13,16 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
13
13
 
14
14
 
15
15
 
16
- var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
17
16
 
17
+ var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
18
18
 
19
- var _chunkCZLYC62Ojs = require('./chunk-CZLYC62O.js');
19
+
20
+ var _chunkTZNQRKDFjs = require('./chunk-TZNQRKDF.js');
20
21
 
21
22
  // src/version.ts
22
- var SDK_VERSION = _chunkCZLYC62Ojs.SDK_RELEASE.version;
23
- var SDK_API_MAJOR = _chunkCZLYC62Ojs.SDK_RELEASE.contracts.api.currentMajor;
24
- var SDK_API_CONTRACT = _nullishCoalesce(_chunkCZLYC62Ojs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
23
+ var SDK_VERSION = _chunkTZNQRKDFjs.SDK_RELEASE.version;
24
+ var SDK_API_MAJOR = _chunkTZNQRKDFjs.SDK_RELEASE.contracts.api.currentMajor;
25
+ var SDK_API_CONTRACT = _nullishCoalesce(_chunkTZNQRKDFjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
25
26
 
26
27
  // src/agent-runtime.ts
27
28
  var _os = require('os');
@@ -491,16 +492,16 @@ var HttpClient = class {
491
492
  if (_optionalChain([options, 'optionalAccess', _136 => _136.retryFromExecutePolicy]) === true && responseRetryAllowed && options.executePolicyMaxRetries !== void 0) {
492
493
  maxRetries = options.executePolicyMaxRetries;
493
494
  }
494
- const structuredToolError = _optionalChain([options, 'optionalAccess', _137 => _137.toolId]) && !response.ok ? _chunkDIAWYWT5js.deserializeToolExecutionFailure.call(void 0,
495
+ const structuredToolError = _optionalChain([options, 'optionalAccess', _137 => _137.toolId]) && !response.ok ? _chunkSQWET4SLjs.deserializeToolExecutionFailure.call(void 0,
495
496
  _chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
496
497
  isRecord(parsed) ? parsed.tool_error : null,
497
- _chunkDIAWYWT5js.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
498
+ _chunkSQWET4SLjs.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
498
499
  ) : null;
499
500
  if (structuredToolError) {
500
501
  if (response.status === 429) {
501
502
  const retryAfter = parseRetryAfter(response);
502
- const failure = _chunkDIAWYWT5js.serializeToolExecutionFailure.call(void 0, structuredToolError);
503
- lastError = failure === null ? structuredToolError : new (0, _chunkALJJRZNJjs.ToolRateLimitError)(structuredToolError.message, {
503
+ const failure = _chunkSQWET4SLjs.serializeToolExecutionFailure.call(void 0, structuredToolError);
504
+ lastError = failure === null ? structuredToolError : new (0, _chunkT2N3B7IQjs.ToolRateLimitError)(structuredToolError.message, {
504
505
  ...failure,
505
506
  retryAfterMs: _nullishCoalesce(failure.retryAfterMs, () => ( Math.max(0, retryAfter)))
506
507
  });
@@ -508,13 +509,13 @@ var HttpClient = class {
508
509
  retryAfterDelayMs = retryAfter;
509
510
  break;
510
511
  }
511
- throw lastError;
512
+ throw _chunkSQWET4SLjs.attachToolUpstreamResponse.call(void 0, lastError, parsed);
512
513
  }
513
- throw structuredToolError;
514
+ throw _chunkSQWET4SLjs.attachToolUpstreamResponse.call(void 0, structuredToolError, parsed);
514
515
  }
515
516
  if (response.status === 429) {
516
517
  if (_optionalChain([options, 'optionalAccess', _138 => _138.preserveRateLimitResponse]) && isMonitorRateLimitEnvelope(parsed)) {
517
- throw new (0, _chunkDIAWYWT5js.DeeplineError)(
518
+ throw new (0, _chunkSQWET4SLjs.DeeplineError)(
518
519
  _chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
519
520
  response.status,
520
521
  _chunkXNYIZMNQjs.apiErrorCodeFromResponse.call(void 0, parsed),
@@ -522,24 +523,24 @@ var HttpClient = class {
522
523
  );
523
524
  }
524
525
  const retryAfter = parseRetryAfter(response);
525
- lastError = new (0, _chunkALJJRZNJjs.RateLimitError)(retryAfter);
526
+ lastError = new (0, _chunkT2N3B7IQjs.RateLimitError)(retryAfter);
526
527
  if (responseRetryAllowed && attempt < maxRetries) {
527
528
  retryAfterDelayMs = retryAfter;
528
529
  break;
529
530
  }
530
- throw lastError;
531
+ throw _optionalChain([options, 'optionalAccess', _139 => _139.toolId]) ? _chunkSQWET4SLjs.attachToolUpstreamResponse.call(void 0, lastError, parsed) : lastError;
531
532
  }
532
533
  if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
533
- throw new (0, _chunkALJJRZNJjs.AuthError)(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
534
+ throw new (0, _chunkT2N3B7IQjs.AuthError)(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
534
535
  }
535
536
  if (!response.ok) {
536
- const retryableApiError = _optionalChain([options, 'optionalAccess', _139 => _139.retryApiErrors]) === true && responseRetryAllowed && isRetryableApiErrorResponse(response.status);
537
+ const retryableApiError = _optionalChain([options, 'optionalAccess', _140 => _140.retryApiErrors]) === true && responseRetryAllowed && isRetryableApiErrorResponse(response.status);
537
538
  const htmlError = detectHtmlErrorBody(
538
539
  body,
539
540
  response.headers.get("content-type")
540
541
  );
541
542
  if (htmlError) {
542
- lastError = new (0, _chunkDIAWYWT5js.DeeplineError)(
543
+ lastError = new (0, _chunkSQWET4SLjs.DeeplineError)(
543
544
  htmlError.message(response.status),
544
545
  response.status,
545
546
  "API_ERROR",
@@ -558,14 +559,14 @@ var HttpClient = class {
558
559
  const errorValue = typeof parsed === "object" && parsed && "error" in parsed ? parsed.error : void 0;
559
560
  const msg = typeof errorValue === "string" ? errorValue : errorValue && typeof errorValue === "object" && "message" in errorValue && typeof errorValue.message === "string" ? errorValue.message : typeof parsed === "object" && parsed && "message" in parsed && typeof parsed.message === "string" ? parsed.message : `HTTP ${response.status}`;
560
561
  const apiErrorCode = _chunkXNYIZMNQjs.apiErrorCodeFromResponse.call(void 0, parsed);
561
- lastError = new (0, _chunkDIAWYWT5js.DeeplineError)(msg, response.status, apiErrorCode, {
562
+ lastError = new (0, _chunkSQWET4SLjs.DeeplineError)(msg, response.status, apiErrorCode, {
562
563
  response: parsed
563
564
  });
564
565
  if (retryableApiError && attempt < maxRetries) {
565
566
  retryAfterDelayMs = parseOptionalRetryAfter(response);
566
567
  break;
567
568
  }
568
- throw lastError;
569
+ throw _optionalChain([options, 'optionalAccess', _141 => _141.toolId]) ? _chunkSQWET4SLjs.attachToolUpstreamResponse.call(void 0, lastError, parsed) : lastError;
569
570
  }
570
571
  if (typeof parsed === "string") {
571
572
  const interstitial = detectHtmlErrorBody(
@@ -573,7 +574,7 @@ var HttpClient = class {
573
574
  response.headers.get("content-type")
574
575
  );
575
576
  if (interstitial) {
576
- throw new (0, _chunkDIAWYWT5js.DeeplineError)(
577
+ throw new (0, _chunkSQWET4SLjs.DeeplineError)(
577
578
  `${this.config.baseUrl} returned a deployment-protection page instead of JSON. Set VERCEL_PROTECTION_BYPASS_TOKEN, or run \`vercel login\` if the CLI session expired.`,
578
579
  response.status,
579
580
  "DEPLOYMENT_PROTECTED",
@@ -585,14 +586,14 @@ var HttpClient = class {
585
586
  } catch (error) {
586
587
  clearTimeout(timeoutId);
587
588
  networkFailedAt = Date.now();
588
- if (_optionalChain([options, 'optionalAccess', _140 => _140.signal, 'optionalAccess', _141 => _141.aborted])) {
589
+ if (_optionalChain([options, 'optionalAccess', _142 => _142.signal, 'optionalAccess', _143 => _143.aborted])) {
589
590
  lastError = requestCancelledError(options.signal);
590
591
  break requestAttempts;
591
592
  }
592
- if (error instanceof _chunkALJJRZNJjs.AuthError || error instanceof _chunkDIAWYWT5js.DeeplineError) {
593
+ if (error instanceof _chunkT2N3B7IQjs.AuthError || error instanceof _chunkSQWET4SLjs.DeeplineError) {
593
594
  throw error;
594
595
  }
595
- if (error instanceof _chunkALJJRZNJjs.RateLimitError) {
596
+ if (error instanceof _chunkT2N3B7IQjs.RateLimitError) {
596
597
  lastError = error;
597
598
  break;
598
599
  }
@@ -600,17 +601,17 @@ var HttpClient = class {
600
601
  timeoutMs,
601
602
  timedOut: requestTimedOut
602
603
  });
603
- if (_optionalChain([options, 'optionalAccess', _142 => _142.retryFromExecutePolicy]) && options.retryAmbiguousDelivery !== true) {
604
+ if (_optionalChain([options, 'optionalAccess', _144 => _144.retryFromExecutePolicy]) && options.retryAmbiguousDelivery !== true) {
604
605
  break requestAttempts;
605
606
  }
606
607
  } finally {
607
608
  clearTimeout(timeoutId);
608
- _optionalChain([options, 'optionalAccess', _143 => _143.signal, 'optionalAccess', _144 => _144.removeEventListener, 'call', _145 => _145("abort", abortRequest)]);
609
+ _optionalChain([options, 'optionalAccess', _145 => _145.signal, 'optionalAccess', _146 => _146.removeEventListener, 'call', _147 => _147("abort", abortRequest)]);
609
610
  }
610
611
  }
611
612
  if (attempt < maxRetries) continue;
612
613
  }
613
- if (lastError instanceof _chunkDIAWYWT5js.DeeplineError) {
614
+ if (lastError instanceof _chunkSQWET4SLjs.DeeplineError) {
614
615
  throw lastError;
615
616
  }
616
617
  const mappedNetworkError = mapNetworkError(
@@ -632,10 +633,10 @@ var HttpClient = class {
632
633
  phase: networkPhase
633
634
  }
634
635
  };
635
- if (_optionalChain([options, 'optionalAccess', _146 => _146.toolId])) {
636
+ if (_optionalChain([options, 'optionalAccess', _148 => _148.toolId])) {
636
637
  const code = mappedNetworkError.code;
637
638
  throw withErrorCause(
638
- new (0, _chunkDIAWYWT5js.ToolExecutionError)(
639
+ new (0, _chunkSQWET4SLjs.ToolExecutionError)(
639
640
  withCoworkNetworkHint(mappedNetworkError.message),
640
641
  {
641
642
  toolId: options.toolId,
@@ -660,7 +661,7 @@ var HttpClient = class {
660
661
  );
661
662
  }
662
663
  throw withErrorCause(
663
- new (0, _chunkDIAWYWT5js.DeeplineError)(
664
+ new (0, _chunkSQWET4SLjs.DeeplineError)(
664
665
  withCoworkNetworkHint(mappedNetworkError.message),
665
666
  void 0,
666
667
  mappedNetworkError.code,
@@ -684,37 +685,37 @@ var HttpClient = class {
684
685
  }
685
686
  async *streamSse(path, options) {
686
687
  const url = `${this.config.baseUrl}${path}`;
687
- const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _147 => _147.method]), () => ( "GET"));
688
+ const method = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _149 => _149.method]), () => ( "GET"));
688
689
  const headers = this.authHeaders({
689
690
  Accept: "text/event-stream",
690
- ..._optionalChain([options, 'optionalAccess', _148 => _148.headers])
691
+ ..._optionalChain([options, 'optionalAccess', _150 => _150.headers])
691
692
  });
692
- if (_optionalChain([options, 'optionalAccess', _149 => _149.body]) !== void 0) {
693
+ if (_optionalChain([options, 'optionalAccess', _151 => _151.body]) !== void 0) {
693
694
  applyExplicitHeaders(headers, { "Content-Type": "application/json" });
694
695
  }
695
696
  let lastError = null;
696
- const candidateUrls = _optionalChain([options, 'optionalAccess', _150 => _150.exactUrlOnly]) ? [url] : buildCandidateUrls(url);
697
+ const candidateUrls = _optionalChain([options, 'optionalAccess', _152 => _152.exactUrlOnly]) ? [url] : buildCandidateUrls(url);
697
698
  for (const candidateUrl of candidateUrls) {
698
699
  try {
699
700
  const response = await fetch(candidateUrl, {
700
701
  method,
701
702
  headers,
702
- body: _optionalChain([options, 'optionalAccess', _151 => _151.body]) !== void 0 ? JSON.stringify(options.body) : void 0,
703
- signal: _optionalChain([options, 'optionalAccess', _152 => _152.signal])
703
+ body: _optionalChain([options, 'optionalAccess', _153 => _153.body]) !== void 0 ? JSON.stringify(options.body) : void 0,
704
+ signal: _optionalChain([options, 'optionalAccess', _154 => _154.signal])
704
705
  });
705
- _optionalChain([options, 'optionalAccess', _153 => _153.onResponse, 'optionalCall', _154 => _154(response)]);
706
+ _optionalChain([options, 'optionalAccess', _155 => _155.onResponse, 'optionalCall', _156 => _156(response)]);
706
707
  if (!response.ok) {
707
708
  const body = await response.text();
708
709
  const parsed = parseResponseBody(body);
709
710
  if (response.status === 401 && !isProviderOriginatedHttpError(parsed)) {
710
- throw new (0, _chunkALJJRZNJjs.AuthError)(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
711
+ throw new (0, _chunkT2N3B7IQjs.AuthError)(_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status));
711
712
  }
712
713
  const htmlError = detectHtmlErrorBody(
713
714
  body,
714
715
  response.headers.get("content-type")
715
716
  );
716
717
  if (htmlError) {
717
- throw new (0, _chunkDIAWYWT5js.DeeplineError)(
718
+ throw new (0, _chunkSQWET4SLjs.DeeplineError)(
718
719
  htmlError.message(response.status),
719
720
  response.status,
720
721
  "API_ERROR",
@@ -725,7 +726,7 @@ var HttpClient = class {
725
726
  }
726
727
  );
727
728
  }
728
- throw new (0, _chunkDIAWYWT5js.DeeplineError)(
729
+ throw new (0, _chunkSQWET4SLjs.DeeplineError)(
729
730
  _chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
730
731
  response.status,
731
732
  _chunkXNYIZMNQjs.apiErrorCodeFromResponse.call(void 0, parsed),
@@ -733,17 +734,17 @@ var HttpClient = class {
733
734
  );
734
735
  }
735
736
  if (!response.body) {
736
- throw new (0, _chunkDIAWYWT5js.DeeplineError)("SSE response did not include a body.");
737
+ throw new (0, _chunkSQWET4SLjs.DeeplineError)("SSE response did not include a body.");
737
738
  }
738
739
  yield* decodeSseStream(response.body);
739
740
  return;
740
741
  } catch (error) {
741
- if (error instanceof _chunkALJJRZNJjs.AuthError || error instanceof _chunkDIAWYWT5js.DeeplineError) {
742
+ if (error instanceof _chunkT2N3B7IQjs.AuthError || error instanceof _chunkSQWET4SLjs.DeeplineError) {
742
743
  throw error;
743
744
  }
744
745
  const normalized = error instanceof Error ? error : new Error(String(error));
745
- if (isAbortLikeError(normalized) && _optionalChain([options, 'optionalAccess', _155 => _155.signal, 'optionalAccess', _156 => _156.aborted])) {
746
- throw new (0, _chunkDIAWYWT5js.DeeplineError)(
746
+ if (isAbortLikeError(normalized) && _optionalChain([options, 'optionalAccess', _157 => _157.signal, 'optionalAccess', _158 => _158.aborted])) {
747
+ throw new (0, _chunkSQWET4SLjs.DeeplineError)(
747
748
  `Stream from ${this.config.baseUrl} was aborted by the caller.`,
748
749
  void 0,
749
750
  "ABORTED"
@@ -753,7 +754,7 @@ var HttpClient = class {
753
754
  }
754
755
  }
755
756
  if (lastError && isAbortLikeError(lastError)) {
756
- throw new (0, _chunkDIAWYWT5js.DeeplineError)(
757
+ throw new (0, _chunkSQWET4SLjs.DeeplineError)(
757
758
  withCoworkNetworkHint(
758
759
  `Unable to stream from ${this.config.baseUrl}. The remote stream was interrupted.`
759
760
  ),
@@ -761,9 +762,9 @@ var HttpClient = class {
761
762
  "PLAY_STREAM_NETWORK_ABORTED"
762
763
  );
763
764
  }
764
- throw new (0, _chunkDIAWYWT5js.DeeplineError)(
765
+ throw new (0, _chunkSQWET4SLjs.DeeplineError)(
765
766
  withCoworkNetworkHint(
766
- _optionalChain([lastError, 'optionalAccess', _157 => _157.message]) ? `Unable to stream from ${this.config.baseUrl}. ${lastError.message}` : `Unable to stream from ${this.config.baseUrl}.`
767
+ _optionalChain([lastError, 'optionalAccess', _159 => _159.message]) ? `Unable to stream from ${this.config.baseUrl}. ${lastError.message}` : `Unable to stream from ${this.config.baseUrl}.`
767
768
  )
768
769
  );
769
770
  }
@@ -825,15 +826,15 @@ function parseResponseBody(body) {
825
826
  }
826
827
  function isProviderOriginatedHttpError(parsed) {
827
828
  const response = asRecord(parsed);
828
- const error = asRecord(_optionalChain([response, 'optionalAccess', _158 => _158.error]));
829
- const failureOrigin = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _159 => _159.failure_origin]), () => ( _optionalChain([response, 'optionalAccess', _160 => _160.failure_origin])));
830
- const code = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _161 => _161.code]), () => ( _optionalChain([response, 'optionalAccess', _162 => _162.code])));
829
+ const error = asRecord(_optionalChain([response, 'optionalAccess', _160 => _160.error]));
830
+ const failureOrigin = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _161 => _161.failure_origin]), () => ( _optionalChain([response, 'optionalAccess', _162 => _162.failure_origin])));
831
+ const code = _nullishCoalesce(_optionalChain([error, 'optionalAccess', _163 => _163.code]), () => ( _optionalChain([response, 'optionalAccess', _164 => _164.code])));
831
832
  return failureOrigin === "provider" || code === "UPSTREAM_BLOCKED";
832
833
  }
833
834
  function isMonitorRateLimitEnvelope(parsed) {
834
835
  const response = asRecord(parsed);
835
- const error = asRecord(_optionalChain([response, 'optionalAccess', _163 => _163.error]));
836
- return (_optionalChain([error, 'optionalAccess', _164 => _164.code]) === "monitor_upstream_rate_limited" || _optionalChain([error, 'optionalAccess', _165 => _165.code]) === "monitor_preview_rate_limited") && typeof error.message === "string";
836
+ const error = asRecord(_optionalChain([response, 'optionalAccess', _165 => _165.error]));
837
+ return (_optionalChain([error, 'optionalAccess', _166 => _166.code]) === "monitor_upstream_rate_limited" || _optionalChain([error, 'optionalAccess', _167 => _167.code]) === "monitor_preview_rate_limited") && typeof error.message === "string";
837
838
  }
838
839
  function asRecord(value) {
839
840
  return typeof value === "object" && value !== null ? value : null;
@@ -849,7 +850,7 @@ function detectHtmlErrorBody(body, contentType) {
849
850
  return null;
850
851
  }
851
852
  const titleMatch = trimmed.match(/<title[^>]*>([\s\S]*?)<\/title>/i);
852
- const title = _optionalChain([titleMatch, 'optionalAccess', _166 => _166[1], 'optionalAccess', _167 => _167.replace, 'call', _168 => _168(/\s+/g, " "), 'access', _169 => _169.trim, 'call', _170 => _170()]) || void 0;
853
+ const title = _optionalChain([titleMatch, 'optionalAccess', _168 => _168[1], 'optionalAccess', _169 => _169.replace, 'call', _170 => _170(/\s+/g, " "), 'access', _171 => _171.trim, 'call', _172 => _172()]) || void 0;
853
854
  const workerThrewException = /worker threw exception/i.test(trimmed);
854
855
  return {
855
856
  title,
@@ -933,20 +934,20 @@ function decodeSseFrame(frame) {
933
934
  }
934
935
  function sleep(ms, signal) {
935
936
  return new Promise((resolve, reject) => {
936
- if (_optionalChain([signal, 'optionalAccess', _171 => _171.aborted])) {
937
+ if (_optionalChain([signal, 'optionalAccess', _173 => _173.aborted])) {
937
938
  reject(requestCancelledError(signal));
938
939
  return;
939
940
  }
940
941
  const timeoutId = setTimeout(() => {
941
- _optionalChain([signal, 'optionalAccess', _172 => _172.removeEventListener, 'call', _173 => _173("abort", abort)]);
942
+ _optionalChain([signal, 'optionalAccess', _174 => _174.removeEventListener, 'call', _175 => _175("abort", abort)]);
942
943
  resolve();
943
944
  }, ms);
944
945
  const abort = () => {
945
946
  clearTimeout(timeoutId);
946
- _optionalChain([signal, 'optionalAccess', _174 => _174.removeEventListener, 'call', _175 => _175("abort", abort)]);
947
+ _optionalChain([signal, 'optionalAccess', _176 => _176.removeEventListener, 'call', _177 => _177("abort", abort)]);
947
948
  reject(requestCancelledError(signal));
948
949
  };
949
- _optionalChain([signal, 'optionalAccess', _176 => _176.addEventListener, 'call', _177 => _177("abort", abort, { once: true })]);
950
+ _optionalChain([signal, 'optionalAccess', _178 => _178.addEventListener, 'call', _179 => _179("abort", abort, { once: true })]);
950
951
  });
951
952
  }
952
953
  function withCoworkNetworkHint(message) {
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  traceCliSpan
3
- } from "./chunk-NP6FLJ75.mjs";
3
+ } from "./chunk-H6BSB2YJ.mjs";
4
4
  import {
5
5
  checkSdkCompatibility,
6
6
  enforceSdkCompatibilityResponse,
7
7
  flushDeferredSkillsSyncNotices
8
- } from "./chunk-TYUC56PS.mjs";
8
+ } from "./chunk-Z3KLCDCB.mjs";
9
9
 
10
10
  // src/cli/play-run-admission.ts
11
11
  function usesInlinePlayAdmission(command, args) {
@@ -3,7 +3,7 @@ import {
3
3
  brandAsProviderTransientError,
4
4
  brandAsToolExecutionError,
5
5
  isProviderTransientFailure
6
- } from "./chunk-HBL4PM5Q.mjs";
6
+ } from "./chunk-ZPGGW27Q.mjs";
7
7
 
8
8
  // src/errors.ts
9
9
  var CustomerDbQueryOutcomeUnknownError = class extends DeeplineError {
@@ -1,10 +1,10 @@
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 _chunkZEZAFOH3js = require('./chunk-ZEZAFOH3.js');
4
+ var _chunkQG3MRMU5js = require('./chunk-QG3MRMU5.js');
5
5
 
6
6
 
7
- var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
7
+ var _chunkT2N3B7IQjs = require('./chunk-T2N3B7IQ.js');
8
8
 
9
9
  // src/config.ts
10
10
 
@@ -382,7 +382,7 @@ function resolveBaseUrlOnly(options) {
382
382
  _optionalChain([options, 'optionalAccess', _36 => _36.baseUrl, 'optionalAccess', _37 => _37.trim, 'call', _38 => _38()]) || autoDetectBaseUrl()
383
383
  );
384
384
  if (!baseUrl) {
385
- throw new (0, _chunkALJJRZNJjs.ConfigError)(
385
+ throw new (0, _chunkT2N3B7IQjs.ConfigError)(
386
386
  `Invalid ${HOST_URL_ENV}. Expected an http(s) URL such as https://code.deepline.com.`
387
387
  );
388
388
  }
@@ -393,13 +393,13 @@ function resolveConfig(options) {
393
393
  _optionalChain([options, 'optionalAccess', _39 => _39.baseUrl, 'optionalAccess', _40 => _40.trim, 'call', _41 => _41()]) || autoDetectBaseUrl()
394
394
  );
395
395
  if (!baseUrl) {
396
- throw new (0, _chunkALJJRZNJjs.ConfigError)(
396
+ throw new (0, _chunkT2N3B7IQjs.ConfigError)(
397
397
  `Invalid ${HOST_URL_ENV}. Expected an http(s) URL such as https://code.deepline.com.`
398
398
  );
399
399
  }
400
400
  const apiKey = resolveApiKeyForBaseUrl(baseUrl, _optionalChain([options, 'optionalAccess', _42 => _42.apiKey]));
401
401
  if (!apiKey) {
402
- throw new (0, _chunkALJJRZNJjs.ConfigError)(
402
+ throw new (0, _chunkT2N3B7IQjs.ConfigError)(
403
403
  `No API key found. Set ${API_KEY_ENV}, add it to .env.deepline, or run: deepline auth register`
404
404
  );
405
405
  }
@@ -502,7 +502,7 @@ function findNearestGitCommonDir(startDir) {
502
502
  function saveProjectDeeplineEnvValues(values, startDir = process.cwd()) {
503
503
  const target = resolveProjectPinTarget(startDir);
504
504
  if (!target.ok) {
505
- throw new (0, _chunkALJJRZNJjs.ConfigError)(
505
+ throw new (0, _chunkT2N3B7IQjs.ConfigError)(
506
506
  `Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
507
507
  ", "
508
508
  )}. Set CLAUDE_PROJECT_DIR or cd into the intended project folder before running this command.`
@@ -711,7 +711,7 @@ function readSkillsVersionFile(path) {
711
711
  }
712
712
  }
713
713
  function resolveAutoSyncSkillAgents() {
714
- switch (_chunkZEZAFOH3js.detectAgentRuntime.call(void 0, )) {
714
+ switch (_chunkQG3MRMU5js.detectAgentRuntime.call(void 0, )) {
715
715
  case "codex":
716
716
  return ["codex"];
717
717
  case "claude_code":
@@ -781,7 +781,7 @@ function writeSdkSkillsLocalVersion(baseUrl, version, agents) {
781
781
  }
782
782
 
783
783
  // src/http.ts
784
- var HttpClient2 = class extends _chunkZEZAFOH3js.HttpClient {
784
+ var HttpClient2 = class extends _chunkQG3MRMU5js.HttpClient {
785
785
  constructor(config) {
786
786
  super(config, readSdkSkillsLocalVersion);
787
787
  }