deepline 0.3.535 → 0.3.537

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 (229) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +232 -147
  2. package/dist/bundling-sources/sdk/src/index.ts +4 -0
  3. package/dist/bundling-sources/sdk/src/plays/local-file-discovery.ts +27 -1
  4. package/dist/bundling-sources/sdk/src/plays/run-request.ts +16 -5
  5. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/types.ts +2 -23
  7. package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +26 -14
  8. package/dist/bundling-sources/shared_libs/integration-contracts/monitor-input-contract.ts +33 -8
  9. package/dist/bundling-sources/shared_libs/monitors/fleets/count-drift-alert.ts +121 -0
  10. package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +8 -0
  11. package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +14 -82
  12. package/dist/bundling-sources/shared_libs/monitors/package.json +1 -0
  13. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +22 -4
  14. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +0 -26
  15. package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +36 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +21 -31
  17. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +88 -96
  18. package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +12 -10
  19. package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +3 -1
  20. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +71 -2
  21. package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +9 -0
  22. package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +2 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +1 -0
  24. package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +127 -9
  25. package/dist/bundling-sources/shared_libs/play-runtime/memory-ledger.ts +15 -2
  26. package/dist/bundling-sources/shared_libs/play-runtime/prebuilt-result-quality.ts +1 -1
  27. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -0
  28. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/fixture-capacity-simulator.ts +1 -0
  29. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/gradient2-concurrency-controller.ts +41 -0
  30. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-capacity-policy.ts +6 -0
  31. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-concurrency-policy.ts +9 -0
  32. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +7 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +2 -2
  34. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +5 -2
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +8 -3
  36. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +7 -0
  37. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +31 -0
  38. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +6 -0
  39. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +26 -1
  40. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +11 -4
  41. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +73 -18
  42. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +169 -2
  43. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +26 -4
  44. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +84 -49
  45. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -32
  46. package/dist/bundling-sources/shared_libs/plays/launch/input-contract.ts +13 -1
  47. package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +68 -1
  48. package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +57 -1
  49. package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +22 -9
  50. package/dist/cli/{auth-ZCTMB5RA.mjs → auth-4SUPGDIM.mjs} +7 -7
  51. package/dist/cli/auth-Y2K2ZYYA.js +43 -0
  52. package/dist/cli/{billing-OU2ZHL72.mjs → billing-5JUA3ZM3.mjs} +185 -24
  53. package/dist/cli/{billing-GVFKZQH3.js → billing-SQU726P7.js} +273 -112
  54. package/dist/cli/{chunk-T2N3B7IQ.js → chunk-2GJZLIKW.js} +8 -8
  55. package/dist/cli/{chunk-ZUVE63Y7.js → chunk-2Q7VXTMS.js} +2 -2
  56. package/dist/cli/{chunk-WAIBM6KX.mjs → chunk-37AZHCTP.mjs} +5 -5
  57. package/dist/cli/{chunk-D4MHCCIR.js → chunk-3PMCQ3LK.js} +33 -33
  58. package/dist/cli/{chunk-R4RG4FV5.mjs → chunk-4KWD3MX2.mjs} +13 -10
  59. package/dist/cli/{chunk-PI5R65OQ.js → chunk-5EOEJKSV.js} +1 -1
  60. package/dist/cli/{chunk-XSOTEVOB.js → chunk-6BBGUQJJ.js} +50 -141
  61. package/dist/cli/{chunk-OM732MGV.js → chunk-ALHKB3AE.js} +17 -17
  62. package/dist/cli/{chunk-6LHX33VN.js → chunk-AVQET3NR.js} +9 -6
  63. package/dist/cli/{chunk-W6T23EUC.mjs → chunk-AX2OAXDL.mjs} +1 -1
  64. package/dist/cli/{chunk-SQWET4SL.js → chunk-BBTKAASQ.js} +2 -1
  65. package/dist/cli/{chunk-G2DLG32W.mjs → chunk-BFHR7IC2.mjs} +40 -27
  66. package/dist/cli/{chunk-KWGXHPHL.js → chunk-BGXEMTIG.js} +523 -59
  67. package/dist/cli/{chunk-AUEUAPVS.mjs → chunk-BRRCWUOW.mjs} +1 -1
  68. package/dist/cli/{chunk-QYBAHYP4.mjs → chunk-C37VELBR.mjs} +7 -9
  69. package/dist/cli/{chunk-H6SWS5CG.mjs → chunk-C3XD2WHM.mjs} +2 -2
  70. package/dist/cli/{chunk-NRO3NTVO.js → chunk-CBV7AKWM.js} +5 -5
  71. package/dist/cli/{chunk-CIDATNTY.js → chunk-CFND2ACL.js} +16 -16
  72. package/dist/cli/{chunk-J75DANZY.mjs → chunk-CGDW2CRR.mjs} +2 -2
  73. package/dist/cli/{chunk-RFQWSH6I.js → chunk-CHIGEDAE.js} +3 -3
  74. package/dist/cli/{chunk-QNHHZ63P.mjs → chunk-CQBIO6HW.mjs} +1 -1
  75. package/dist/cli/{chunk-2KHUFWTK.js → chunk-CQDQNZGH.js} +42 -37
  76. package/dist/cli/{chunk-E3CLOVG5.mjs → chunk-CXTW7SRW.mjs} +50 -141
  77. package/dist/cli/{chunk-4NLRWKZB.js → chunk-D77W6Q67.js} +26 -26
  78. package/dist/cli/{chunk-JWWYLGUT.mjs → chunk-EEFSUCYP.mjs} +475 -11
  79. package/dist/cli/{chunk-STR5LXK4.mjs → chunk-FSIVF2SI.mjs} +1 -1
  80. package/dist/cli/{chunk-6TYRRNXY.mjs → chunk-GI3V4D7K.mjs} +2 -2
  81. package/dist/cli/{chunk-DFJODFMC.mjs → chunk-GPMS6OPX.mjs} +5 -5
  82. package/dist/cli/{chunk-5YAJGRWB.js → chunk-IPVRMYWT.js} +7 -7
  83. package/dist/cli/{chunk-DAPKLYST.js → chunk-IQOIT6E3.js} +41 -41
  84. package/dist/cli/{chunk-ZPGGW27Q.mjs → chunk-JL2OTMSG.mjs} +1 -0
  85. package/dist/cli/{chunk-FGN75ZN6.js → chunk-JMHYDDBQ.js} +390 -382
  86. package/dist/cli/{chunk-KA6ZERJL.js → chunk-JS2SBCWD.js} +6 -6
  87. package/dist/cli/{chunk-W5YJYU4G.mjs → chunk-K4WJ4BYO.mjs} +2 -2
  88. package/dist/cli/{chunk-LVISZFYO.mjs → chunk-KH27B2HJ.mjs} +2 -2
  89. package/dist/cli/{chunk-UUQ2OXMH.js → chunk-KULT6O5K.js} +18 -20
  90. package/dist/cli/{chunk-YFZLZNTH.mjs → chunk-L3JVGNAT.mjs} +4 -4
  91. package/dist/cli/{chunk-HYBZWSSH.js → chunk-L6QAIZNZ.js} +44 -44
  92. package/dist/cli/{chunk-TCVCFZP6.mjs → chunk-NU7B5X6J.mjs} +4 -1
  93. package/dist/cli/{chunk-7PXP2FQK.js → chunk-NXGLJGPB.js} +2 -2
  94. package/dist/cli/{chunk-BNH4Y35W.mjs → chunk-OLH2PHMC.mjs} +2 -2
  95. package/dist/cli/{chunk-GESIFFQX.mjs → chunk-OVX3Q5Q3.mjs} +1 -1
  96. package/dist/cli/{chunk-2D6SWQTK.js → chunk-PJ4ZGZAN.js} +13 -13
  97. package/dist/cli/{chunk-HWPOXCCK.js → chunk-PU42VOBI.js} +8 -8
  98. package/dist/cli/{chunk-RKY4LBX3.mjs → chunk-QDBGPRR2.mjs} +3 -3
  99. package/dist/cli/{chunk-KOZBZPRM.js → chunk-QPDLG7DQ.js} +55 -55
  100. package/dist/cli/{chunk-DWPY6ZID.mjs → chunk-R7JYG6XO.mjs} +1 -1
  101. package/dist/cli/{chunk-K76AEBFY.mjs → chunk-RMVZTBI5.mjs} +4 -4
  102. package/dist/cli/{chunk-IF75RD6U.js → chunk-U2LVWCTD.js} +18 -6
  103. package/dist/cli/{chunk-WNNA4L6Z.js → chunk-UGA5KI4A.js} +22 -22
  104. package/dist/cli/{chunk-ZS2WHWWL.js → chunk-UNDLNT3V.js} +1 -1
  105. package/dist/cli/{chunk-7CWSAEYS.mjs → chunk-V5IIBG2E.mjs} +1 -1
  106. package/dist/cli/{chunk-BF65LB7X.mjs → chunk-VP2K5B3R.mjs} +4 -4
  107. package/dist/cli/{chunk-DYIWDUY4.js → chunk-VRYX2BR4.js} +316 -303
  108. package/dist/cli/{chunk-R2KKEHJN.mjs → chunk-W3J3LT22.mjs} +5 -5
  109. package/dist/cli/{chunk-PHLNYBAA.js → chunk-WBFOV5HT.js} +5 -5
  110. package/dist/cli/{chunk-5EKNDNFQ.js → chunk-WBTYWJLN.js} +2 -2
  111. package/dist/cli/{chunk-C374C22Y.js → chunk-WOQO3GV4.js} +14 -11
  112. package/dist/cli/{chunk-K3IPGMGP.js → chunk-XDS26J7Z.js} +17 -19
  113. package/dist/cli/{chunk-JQQG4QL4.mjs → chunk-Y6AMMXWS.mjs} +3 -3
  114. package/dist/cli/{chunk-7R5DAANG.mjs → chunk-Z2PPB3IO.mjs} +1 -1
  115. package/dist/cli/{chunk-FKD3KL5Q.mjs → chunk-Z2XA6YU4.mjs} +10 -5
  116. package/dist/cli/{chunk-243O3FH5.js → chunk-ZFSB7GXF.js} +5 -5
  117. package/dist/cli/{chunk-MI6ZP7XI.mjs → chunk-ZG7BOECV.mjs} +18 -6
  118. package/dist/cli/{chunk-FZKPPB5P.mjs → chunk-ZHPSJ3LJ.mjs} +85 -77
  119. package/dist/cli/{chunk-K53NKWZO.mjs → chunk-ZUAMXZXC.mjs} +13 -15
  120. package/dist/cli/command-docs.js +2 -2
  121. package/dist/cli/command-docs.mjs +1 -1
  122. package/dist/cli/{csv-CLPVMIRF.mjs → csv-HZP6QMG7.mjs} +6 -6
  123. package/dist/cli/{csv-CD55KEIO.js → csv-JITYN27L.js} +15 -15
  124. package/dist/cli/{db-MQKLDAEO.js → db-FYSRB7O4.js} +36 -36
  125. package/dist/cli/{db-AU4SMWUN.mjs → db-QRIRTOMM.mjs} +9 -9
  126. package/dist/cli/describe-LSOHOLFI.js +49 -0
  127. package/dist/cli/describe-REXJVJC3.mjs +49 -0
  128. package/dist/cli/describe-core.d.mts +3 -3
  129. package/dist/cli/describe-core.d.ts +3 -3
  130. package/dist/cli/describe-core.js +5 -5
  131. package/dist/cli/describe-core.mjs +4 -4
  132. package/dist/cli/{executions-TFIJPUX7.mjs → executions-53KJAFOW.mjs} +9 -9
  133. package/dist/cli/{executions-77GOLWRM.js → executions-BSTF4DDS.js} +11 -11
  134. package/dist/cli/{feedback-OV5YAL3A.js → feedback-6MW3QOXX.js} +16 -16
  135. package/dist/cli/{feedback-2WRSZ5WL.mjs → feedback-CWUJJF3J.mjs} +8 -8
  136. package/dist/cli/{git-VNS4ATLZ.mjs → git-CKVZTJFS.mjs} +7 -7
  137. package/dist/cli/git-S7SWUZ3T.js +25 -0
  138. package/dist/cli/index.js +151 -157
  139. package/dist/cli/index.mjs +51 -57
  140. package/dist/cli/{legacy-noops-HDOB5C6F.js → legacy-noops-QBL4PNGB.js} +11 -11
  141. package/dist/cli/{legacy-noops-C732QDCY.mjs → legacy-noops-USTBRFRX.mjs} +8 -8
  142. package/dist/cli/{monitors-2LYEFXOU.mjs → monitors-6UCG5D7W.mjs} +19 -16
  143. package/dist/cli/{monitors-5IUMHH3E.js → monitors-VCR6SUZD.js} +125 -122
  144. package/dist/cli/{org-G4YGZPHS.mjs → org-GSRBOJVO.mjs} +9 -9
  145. package/dist/cli/{org-ADW2EVAC.js → org-HPILTEG4.js} +89 -89
  146. package/dist/cli/{play-7GQ56C2D.mjs → play-QRTYQNG4.mjs} +123 -76
  147. package/dist/cli/{play-EHSOSSHT.js → play-TK7WOP5H.js} +641 -594
  148. package/dist/cli/{providers-PWCF6OOO.js → providers-HEXNJ5QC.js} +12 -12
  149. package/dist/cli/{providers-WL3YTCSV.mjs → providers-OAQJWVBS.mjs} +9 -9
  150. package/dist/cli/{quickstart-323XOPGI.mjs → quickstart-FFVHTPSP.mjs} +6 -6
  151. package/dist/cli/{quickstart-ZKI5MURA.js → quickstart-PYZTFXZX.js} +8 -8
  152. package/dist/cli/{run-XZPWA6JS.js → run-4DWJXJRO.js} +50 -53
  153. package/dist/cli/{run-ZCNZU3K2.mjs → run-HLN6YYZH.mjs} +31 -34
  154. package/dist/cli/search-WERQBC6V.js +32 -0
  155. package/dist/cli/{search-CVLVSFMJ.mjs → search-ZHRCXGEL.mjs} +10 -11
  156. package/dist/cli/{search-output-7HRSSRBS.js → search-output-2KY6PFDH.js} +8 -8
  157. package/dist/cli/{search-output-6PY6RN2R.mjs → search-output-N7QXACVK.mjs} +6 -6
  158. package/dist/cli/{secrets-6S2ZWDIM.mjs → secrets-FKMWBLHU.mjs} +9 -9
  159. package/dist/cli/{secrets-IYD5VKY4.js → secrets-WXQ7XO5C.js} +18 -18
  160. package/dist/cli/{sessions-GVEX5TUJ.mjs → sessions-3YDTEDA5.mjs} +8 -8
  161. package/dist/cli/sessions-LXQ4Q6BS.js +22 -0
  162. package/dist/cli/{settings-CANK4HJQ.js → settings-67TWLQ6E.js} +88 -89
  163. package/dist/cli/{settings-BN5MJZ3C.mjs → settings-JTPASUZN.mjs} +15 -16
  164. package/dist/cli/{setup-YSGKGLSJ.js → setup-KUERQJUX.js} +51 -52
  165. package/dist/cli/{setup-JNMSCCU4.mjs → setup-VYNGXUJ6.mjs} +11 -12
  166. package/dist/cli/skills-EFRLHY3F.js +36 -0
  167. package/dist/cli/{skills-QCQN2UM2.mjs → skills-KI4KYHH6.mjs} +9 -10
  168. package/dist/cli/tools-C3EIGFFP.js +56 -0
  169. package/dist/cli/{tools-CDPOID7V.mjs → tools-UQDJS2RS.mjs} +20 -21
  170. package/dist/cli/{update-D3ZERUQ3.mjs → update-7FQQUBOD.mjs} +11 -12
  171. package/dist/cli/update-KCY72RXH.js +34 -0
  172. package/dist/cli/{views-RDZRWQBQ.mjs → views-JAM4MNNV.mjs} +54 -10
  173. package/dist/cli/{views-4NV2KQKA.js → views-MJK7JGZG.js} +66 -22
  174. package/dist/cli/{workflow-RABJCAZC.js → workflow-AQPRIWQX.js} +20 -20
  175. package/dist/cli/{workflow-2CG3TVCG.mjs → workflow-TQRV5FGO.mjs} +10 -10
  176. package/dist/{client-DhSvMO3A.d.mts → client-BlLYQDNo.d.mts} +1 -1
  177. package/dist/{client-oGNJMQFd.d.ts → client-DSQlkIDO.d.ts} +1 -1
  178. package/dist/{client-core-CdWH6Sii.d.ts → client-core-CDwapXy5.d.ts} +159 -108
  179. package/dist/{client-core-CVG1Et-4.d.mts → client-core-rX7n2H8U.d.mts} +159 -108
  180. package/dist/{compiler-manifest-D2ZlBGxj.d.ts → compiler-manifest-BHNC4RL-.d.mts} +15 -22
  181. package/dist/{compiler-manifest-D2ZlBGxj.d.mts → compiler-manifest-BHNC4RL-.d.ts} +15 -22
  182. package/dist/{errors-B-gOQdj-.d.mts → errors-D7sPXrvB.d.mts} +1 -1
  183. package/dist/{errors-CB0KAmmV.d.ts → errors-lhtIWG5Z.d.ts} +1 -1
  184. package/dist/{index-c3nvUGCS.d.ts → index-CQTBHXHr.d.ts} +1 -1
  185. package/dist/{index-BbJADro4.d.mts → index-NaDZq2xf.d.mts} +1 -1
  186. package/dist/index.d.mts +7 -7
  187. package/dist/index.d.ts +7 -7
  188. package/dist/index.js +15 -15
  189. package/dist/index.mjs +11 -11
  190. package/dist/install-integrity.json +129 -132
  191. package/dist/monitor-fleet-contract.d.mts +17 -11
  192. package/dist/monitor-fleet-contract.d.ts +17 -11
  193. package/dist/monitor-fleet-contract.js +3 -3
  194. package/dist/monitor-fleet-contract.mjs +2 -2
  195. package/dist/monitor-input-contract.js +2 -2
  196. package/dist/monitor-input-contract.mjs +1 -1
  197. package/dist/plays/bundle-play-file.d.mts +3 -3
  198. package/dist/plays/bundle-play-file.d.ts +3 -3
  199. package/dist/plays/bundle-play-file.mjs +17 -5
  200. package/dist/plays/csv-data-input.js +3 -3
  201. package/dist/plays/csv-data-input.mjs +2 -2
  202. package/dist/plays/play-description.d.mts +2 -2
  203. package/dist/plays/play-description.d.ts +2 -2
  204. package/dist/plays/run-request.d.mts +2 -2
  205. package/dist/plays/run-request.d.ts +2 -2
  206. package/dist/plays/run-request.js +3 -3
  207. package/dist/plays/run-request.mjs +2 -2
  208. package/dist/release.d.mts +1 -1
  209. package/dist/release.d.ts +1 -1
  210. package/dist/release.js +2 -2
  211. package/dist/release.mjs +1 -1
  212. package/dist/server.d.mts +4 -4
  213. package/dist/server.d.ts +4 -4
  214. package/dist/server.js +12 -12
  215. package/dist/server.mjs +6 -6
  216. package/package.json +1 -1
  217. package/dist/cli/auth-VDCU3T6A.js +0 -43
  218. package/dist/cli/chunk-4QELPWUW.mjs +0 -405
  219. package/dist/cli/chunk-T7RBM2WX.js +0 -405
  220. package/dist/cli/describe-5BFNHT5V.js +0 -50
  221. package/dist/cli/describe-AWJUXE2U.mjs +0 -50
  222. package/dist/cli/git-HGMX52XU.js +0 -25
  223. package/dist/cli/pages-KXKWSCEV.mjs +0 -266
  224. package/dist/cli/pages-VTJGAI2D.js +0 -266
  225. package/dist/cli/search-J6EY7DQN.js +0 -33
  226. package/dist/cli/sessions-7HPIVSQ4.js +0 -22
  227. package/dist/cli/skills-WDGSSKJZ.js +0 -37
  228. package/dist/cli/tools-URNVXSTZ.js +0 -57
  229. package/dist/cli/update-Q6JW32IA.js +0 -35
@@ -2,15 +2,21 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkHWPOXCCKjs = require('./chunk-HWPOXCCK.js');
6
5
 
7
6
 
8
- var _chunkD4MHCCIRjs = require('./chunk-D4MHCCIR.js');
7
+ var _chunkPU42VOBIjs = require('./chunk-PU42VOBI.js');
9
8
 
10
9
 
11
10
 
12
11
 
13
- var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
12
+
13
+ var _chunk3PMCQ3LKjs = require('./chunk-3PMCQ3LK.js');
14
+
15
+
16
+
17
+
18
+
19
+ var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
14
20
 
15
21
  // src/cli/json-fields.ts
16
22
  var RUN_FIELDS = new Set(
@@ -45,7 +51,7 @@ function parseJsonFields(args, surface) {
45
51
  if (parts.some(
46
52
  (part) => !/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(part) || ["__proto__", "prototype", "constructor"].includes(part)
47
53
  ) || !allowed.has(parts[0])) {
48
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
54
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
49
55
  `Unknown --json field '${path}'. Available roots: ${[...allowed].join(", ")}.`,
50
56
  void 0,
51
57
  "INVALID_ARGUMENT"
@@ -53,7 +59,7 @@ function parseJsonFields(args, surface) {
53
59
  }
54
60
  if (parts[0] === "run" && parts[1] && !RUN_FIELDS.has(parts[1])) {
55
61
  const hint = parts[1] === "url" ? " Use runUrl." : parts[1] === "stats" ? " Dataset summaries are in datasets; run timing is in run.durationMs." : "";
56
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
62
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
57
63
  `Unknown --json run field '${parts[1]}'. Available: ${[...RUN_FIELDS].join(", ")}.${hint}`,
58
64
  void 0,
59
65
  "INVALID_ARGUMENT"
@@ -63,7 +69,7 @@ function parseJsonFields(args, surface) {
63
69
  const target = args[0] && !args[0].startsWith("-") ? args[0] : "<target>";
64
70
  const command = surface === "get" ? "runs get" : `plays ${surface}`;
65
71
  const quotedTarget = `'${target.replace(/'/g, "'\\''")}'`;
66
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
72
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
67
73
  `--json diagnostics requires --full. For inspection, use: deepline ${surface === "run" ? "runs get <run-id>" : `${command} ${quotedTarget}`} --full`,
68
74
  void 0,
69
75
  "INVALID_ARGUMENT"
@@ -73,7 +79,7 @@ function parseJsonFields(args, surface) {
73
79
  fields = [..._nullishCoalesce(fields, () => ( [])), ...paths];
74
80
  }
75
81
  if (fields && normalized.includes("--input") && surface === "get") {
76
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
82
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
77
83
  "--json fields selects the run response, not --input. Use bare --json with --input.",
78
84
  void 0,
79
85
  "INVALID_ARGUMENT"
@@ -186,6 +192,388 @@ function withJsonNotices(value) {
186
192
  return { ...record, notices };
187
193
  }
188
194
 
195
+ // src/cli/failure-reporting.ts
196
+ var _os = require('os');
197
+ var FAILURE_REPORT_DISABLE_ENV = "DEEPLINE_DISABLE_FAILURE_REPORTING";
198
+ var REPORT_FAILURE_TIMEOUT_MS = 1e4;
199
+ var BACKGROUND_REPORT_FAILURE_TIMEOUT_MS = 2e3;
200
+ var MAX_FAILURE_TEXT_CHARS = 4e3;
201
+ var MAX_COMMAND_TOKENS = 3;
202
+ var REPORTABLE_EXIT_CODES = /* @__PURE__ */ new Set([4, 5]);
203
+ var EMAIL_RE = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi;
204
+ var UNIX_PATH_RE = /(?:\/Users\/|\/home\/|\/var\/folders\/|\/tmp\/|\/sessions\/)[^"'\n\r`]+/g;
205
+ var WINDOWS_PATH_RE = /[A-Za-z]:(?:\\{1,2})(?:Users|Temp|tmp)(?:\\{1,2})[^"'\n\r`]+/g;
206
+ var ASSIGNMENT_SECRET_RE = /\b(access[_-]?token|api[_-]?key|apikey|auth(?:orization)?|bearer|password|secret|session)\b(\s*[:=]\s*)(?!Bearer\s+\[redacted-secret\])([^\s,;]+)/gi;
207
+ var BEARER_SECRET_RE = /\b(bearer)\s+([A-Za-z0-9._-]+)/gi;
208
+ var GENERIC_TOKEN_RE = /\b(?:dlp|sk|ghp|xox[baprs])[-_A-Za-z0-9]{8,}\b/g;
209
+ var SECRET_OPTION_RE = /^--?(?:access[-_]?token|api[-_]?key|apikey|auth(?:orization)?|bearer|password|secret|session|token)$/i;
210
+ function truthyEnv(name) {
211
+ return ["1", "true", "yes", "on"].includes(
212
+ String(_nullishCoalesce(process.env[name], () => ( ""))).trim().toLowerCase()
213
+ );
214
+ }
215
+ function isFailureReportingDisabled() {
216
+ return truthyEnv(FAILURE_REPORT_DISABLE_ENV);
217
+ }
218
+ function redactFailureText(value, maxChars = MAX_FAILURE_TEXT_CHARS) {
219
+ const home = _optionalChain([process, 'access', _2 => _2.env, 'access', _3 => _3.HOME, 'optionalAccess', _4 => _4.trim, 'call', _5 => _5()]);
220
+ let text = String(_nullishCoalesce(value, () => ( "")));
221
+ if (!text) return "";
222
+ if (home && home !== "/") {
223
+ text = text.split(home).join("~");
224
+ }
225
+ return text.replace(EMAIL_RE, "[redacted-email]").replace(UNIX_PATH_RE, "[redacted-path]").replace(WINDOWS_PATH_RE, "[redacted-path]").replace(BEARER_SECRET_RE, "$1 [redacted-secret]").replace(ASSIGNMENT_SECRET_RE, "$1$2[redacted-secret]").replace(GENERIC_TOKEN_RE, "[redacted-secret]").slice(0, maxChars);
226
+ }
227
+ function sanitizeCommand(argv, prefix = "deepline") {
228
+ const tokens = [];
229
+ for (let index = 0; index < argv.length; index += 1) {
230
+ const arg = argv[index];
231
+ const value = String(_nullishCoalesce(arg, () => ( ""))).trim();
232
+ if (!value) continue;
233
+ if (value.startsWith("-")) {
234
+ if (!value.includes("=") && SECRET_OPTION_RE.test(value)) {
235
+ index += 1;
236
+ }
237
+ continue;
238
+ }
239
+ tokens.push(redactFailureText(value, 200));
240
+ if (tokens.length >= MAX_COMMAND_TOKENS) break;
241
+ }
242
+ return tokens.length > 0 ? [prefix, ...tokens].join(" ") : prefix;
243
+ }
244
+ function errorMessage(error) {
245
+ if (error instanceof Error) return `${error.name}: ${error.message}`;
246
+ return String(_nullishCoalesce(error, () => ( "")));
247
+ }
248
+ function errorStack(error) {
249
+ if (error instanceof Error && error.stack) {
250
+ return redactFailureText(error.stack);
251
+ }
252
+ return null;
253
+ }
254
+ function classifyNetworkFailure(error) {
255
+ const seen = /* @__PURE__ */ new Set();
256
+ let current = error;
257
+ while (current && !seen.has(current)) {
258
+ seen.add(current);
259
+ const record = typeof current === "object" && current !== null ? current : {};
260
+ const code = String(_nullishCoalesce(record.code, () => ( ""))).toLowerCase();
261
+ const name = current instanceof Error ? current.name.toLowerCase() : "";
262
+ const text = String(
263
+ current instanceof Error ? current.message : current
264
+ ).toLowerCase();
265
+ const combined = `${code} ${name} ${text}`;
266
+ if (combined.includes("aborterror") || combined.includes("timeout") || combined.includes("timed out") || combined.includes("etimedout")) {
267
+ return "network_timeout";
268
+ }
269
+ if (combined.includes("enotfound") || combined.includes("eai_again") || combined.includes("getaddrinfo") || combined.includes("name or service not known") || combined.includes("temporary failure in name resolution")) {
270
+ return "network_dns_resolution_failed";
271
+ }
272
+ if (combined.includes("econnrefused") || combined.includes("connection refused")) {
273
+ return "network_connection_refused";
274
+ }
275
+ if (combined.includes("econnreset") || combined.includes("connection reset")) {
276
+ return "network_connection_reset";
277
+ }
278
+ if (combined.includes("incompleteread") || combined.includes("incomplete read")) {
279
+ return "network_incomplete_read";
280
+ }
281
+ if (combined.includes("remotedisconnected") || combined.includes("remote end closed connection") || combined.includes("other side closed") || combined.includes("socket hang up")) {
282
+ return "network_remote_disconnected";
283
+ }
284
+ if (
285
+ // Local filenames and retry commands may contain "ssl" or "tls".
286
+ // Require a transport identifier or protocol failure text instead.
287
+ code.includes("ssl") || code.includes("tls") || name.includes("ssl") || name.includes("tls") || /(?:^|[\s[(:])(?:ssl|tls)[\s:_-]+(?:error|handshake|certificate|routines|connection|failed|failure)(?:$|[\s:_-])/.test(
288
+ text
289
+ ) || combined.includes("unexpected_eof_while_reading")
290
+ ) {
291
+ return "network_ssl_error";
292
+ }
293
+ current = _nullishCoalesce(record.cause, () => ( record.context));
294
+ }
295
+ return "network_error";
296
+ }
297
+ function classifyNetworkCauseCategory(error) {
298
+ const seen = /* @__PURE__ */ new Set();
299
+ let cause = error;
300
+ while (cause && typeof cause === "object" && !seen.has(cause)) {
301
+ seen.add(cause);
302
+ const record = cause;
303
+ if (record.code === "UND_ERR_CONNECT_TIMEOUT") return "connect_timeout";
304
+ cause = record.cause;
305
+ }
306
+ switch (classifyNetworkFailure(error)) {
307
+ case "network_dns_resolution_failed":
308
+ return "dns";
309
+ case "network_ssl_error":
310
+ return "tls";
311
+ case "network_connection_reset":
312
+ return "reset";
313
+ case "network_timeout":
314
+ return "timeout";
315
+ default:
316
+ return "unknown";
317
+ }
318
+ }
319
+ function isNetworkFailure(error) {
320
+ if (!(error instanceof Error)) return false;
321
+ if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.statusCode) return false;
322
+ const code = classifyNetworkFailure(error);
323
+ return code !== "network_error" || /unable to connect|unable to stream/i.test(error.message);
324
+ }
325
+ function buildEnvironmentContext() {
326
+ const context = {
327
+ os: _os.platform.call(void 0, ),
328
+ os_release: _os.release.call(void 0, ),
329
+ platform: `${_os.platform.call(void 0, )}-${_os.release.call(void 0, )}-${process.arch}`,
330
+ node_version: process.version,
331
+ runtime: "Node.js",
332
+ hostname: _os.hostname.call(void 0, ),
333
+ agent_runtime: _chunk3PMCQ3LKjs.detectAgentRuntime.call(void 0, )
334
+ };
335
+ for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
336
+ const normalized = _optionalChain([process, 'access', _6 => _6.env, 'access', _7 => _7[key], 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()]);
337
+ if (normalized) context[key.toLowerCase()] = normalized;
338
+ }
339
+ if (_optionalChain([process, 'access', _10 => _10.env, 'access', _11 => _11.CLAUDE_PROJECT_DIR, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()])) {
340
+ context.claude_project_dir_present = "true";
341
+ }
342
+ if (_optionalChain([process, 'access', _14 => _14.env, 'access', _15 => _15.DEEPLINE_PLUGIN_ROOT, 'optionalAccess', _16 => _16.trim, 'call', _17 => _17()])) {
343
+ context.deepline_plugin_root_present = "true";
344
+ }
345
+ if (_optionalChain([process, 'access', _18 => _18.env, 'access', _19 => _19.DEEPLINE_PLUGIN_SKILLS_DIR, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()])) {
346
+ context.deepline_plugin_skills_dir_present = "true";
347
+ }
348
+ if (_optionalChain([process, 'access', _22 => _22.env, 'access', _23 => _23.HOME, 'optionalAccess', _24 => _24.trim, 'call', _25 => _25(), 'access', _26 => _26.startsWith, 'call', _27 => _27("/sessions/")])) {
349
+ context.home_scope = "sessions";
350
+ }
351
+ return context;
352
+ }
353
+ function failureReportHeaders(apiKey) {
354
+ const agentSessionId = _chunk3PMCQ3LKjs.agentSessionIdFromEnvironment.call(void 0, );
355
+ return {
356
+ ..._chunk3PMCQ3LKjs.deploymentProtectionHeaders.call(void 0, ),
357
+ ...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {},
358
+ Authorization: `Bearer ${apiKey}`,
359
+ "Content-Type": "application/json",
360
+ "User-Agent": `deepline-ts-sdk/${_chunk3PMCQ3LKjs.SDK_VERSION}`,
361
+ "X-Deepline-Client-Family": "sdk",
362
+ "X-Deepline-CLI-Family": "sdk",
363
+ "X-Deepline-Agent-Runtime": _chunk3PMCQ3LKjs.detectAgentRuntime.call(void 0, ),
364
+ "X-Deepline-CLI-Version": _chunk3PMCQ3LKjs.SDK_VERSION,
365
+ "X-Deepline-SDK-Version": _chunk3PMCQ3LKjs.SDK_VERSION
366
+ };
367
+ }
368
+ async function postFailureReport(input) {
369
+ const controller = new AbortController();
370
+ const timeout = setTimeout(() => controller.abort(), input.timeoutMs);
371
+ if (input.background) timeout.unref();
372
+ try {
373
+ await fetch(new URL("/api/v2/cli/report-failure", input.baseUrl), {
374
+ method: "POST",
375
+ headers: failureReportHeaders(input.apiKey),
376
+ body: JSON.stringify(input.body),
377
+ signal: controller.signal
378
+ });
379
+ return true;
380
+ } catch (e) {
381
+ return false;
382
+ } finally {
383
+ clearTimeout(timeout);
384
+ }
385
+ }
386
+ function boundedTelemetryString(value, maxChars) {
387
+ return redactFailureText(value.trim(), maxChars);
388
+ }
389
+ async function maybeReportAutomaticSkillsSyncFailure(input) {
390
+ if (isFailureReportingDisabled()) return false;
391
+ let apiKey = "";
392
+ try {
393
+ apiKey = _chunkPU42VOBIjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
394
+ } catch (e2) {
395
+ return false;
396
+ }
397
+ if (!apiKey) return false;
398
+ const attempts = input.attempts.slice(0, 2).map((attempt) => ({
399
+ installer: attempt.installer,
400
+ outcome: attempt.outcome,
401
+ exit_code: typeof attempt.exitCode === "number" && Number.isFinite(attempt.exitCode) ? Math.trunc(attempt.exitCode) : null
402
+ }));
403
+ const agents = input.agents.slice(0, 8).map((agent) => boundedTelemetryString(agent, 100)).filter(Boolean);
404
+ const baseUrl = input.baseUrl.replace(/\/$/, "");
405
+ const failureKind = "background_warning";
406
+ const failureCode2 = "SKILLS_AUTO_SYNC_FAILED";
407
+ const failureStage = "skills_install";
408
+ return postFailureReport({
409
+ baseUrl,
410
+ apiKey,
411
+ timeoutMs: BACKGROUND_REPORT_FAILURE_TIMEOUT_MS,
412
+ background: true,
413
+ body: {
414
+ command: "deepline skills",
415
+ subcommand: "skills",
416
+ failure_kind: failureKind,
417
+ failure_code: failureCode2,
418
+ failure_stage: failureStage,
419
+ error_body: "Automatic Deepline skills installation failed.",
420
+ cli_version: _chunk3PMCQ3LKjs.SDK_VERSION,
421
+ context: {
422
+ environment: buildEnvironmentContext(),
423
+ skills_sync: {
424
+ skills_package: boundedTelemetryString(input.skillsPackage, 100),
425
+ remote_skills_version: boundedTelemetryString(
426
+ input.remoteSkillsVersion,
427
+ 200
428
+ ),
429
+ agents,
430
+ target_skill_count: Math.max(
431
+ 0,
432
+ Math.trunc(
433
+ Number.isFinite(input.targetSkillCount) ? input.targetSkillCount : 0
434
+ )
435
+ ),
436
+ marker_written: input.markerWritten,
437
+ attempts
438
+ }
439
+ }
440
+ }
441
+ });
442
+ }
443
+ function subcommandFromArgv(argv) {
444
+ return _nullishCoalesce(argv.find((arg) => arg && !arg.startsWith("-")), () => ( null));
445
+ }
446
+ function commandTokens(argv) {
447
+ return argv.map((arg) => String(_nullishCoalesce(arg, () => ( ""))).trim()).filter((arg) => arg && !arg.startsWith("-"));
448
+ }
449
+ function isServerLoggedPlayRunStartFailure(input) {
450
+ const [subcommand, command] = commandTokens(input.argv);
451
+ return subcommand === "plays" && command === "run" && input.error instanceof _chunkBBTKAASQjs.DeeplineError && typeof input.error.statusCode === "number";
452
+ }
453
+ function shouldReport(input) {
454
+ if (input.error !== void 0) return true;
455
+ return input.exitCode !== null && REPORTABLE_EXIT_CODES.has(input.exitCode);
456
+ }
457
+ function failureCode(input) {
458
+ if (input.error !== void 0) {
459
+ if (isNetworkFailure(input.error))
460
+ return classifyNetworkFailure(input.error);
461
+ if (input.error instanceof _chunkBBTKAASQjs.DeeplineError && input.error.code) {
462
+ return input.error.code;
463
+ }
464
+ if (input.error instanceof Error && input.error.name)
465
+ return input.error.name;
466
+ return "CLI_FAILURE";
467
+ }
468
+ return input.exitCode === 4 ? "network_error" : "command_exit";
469
+ }
470
+ function resolvedExitCode(input) {
471
+ if (typeof input.exitCode === "number" && Number.isFinite(input.exitCode)) {
472
+ return Math.trunc(input.exitCode);
473
+ }
474
+ if (input.error === void 0) return null;
475
+ return isNetworkFailure(input.error) ? 4 : 5;
476
+ }
477
+ function resolveSdkCliFailureExitCode(error) {
478
+ return isNetworkFailure(error) ? 4 : 1;
479
+ }
480
+ function resolvedFailureKind(input) {
481
+ return input.error === void 0 ? "command_exit" : "uncaught_exception";
482
+ }
483
+ function safeRequestDiagnostics(error) {
484
+ if (!(error instanceof _chunkBBTKAASQjs.DeeplineError)) return null;
485
+ const request = _optionalChain([error, 'access', _28 => _28.details, 'optionalAccess', _29 => _29.request]);
486
+ if (!request || typeof request !== "object" || Array.isArray(request))
487
+ return null;
488
+ const value = request;
489
+ const result = {};
490
+ if (typeof value.phase === "string" && [
491
+ "before_request",
492
+ "retry_wait",
493
+ "awaiting_headers",
494
+ "reading_body"
495
+ ].includes(value.phase))
496
+ result.phase = value.phase;
497
+ if (typeof value.method === "string" && /^(GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS)$/.test(value.method))
498
+ result.method = value.method;
499
+ if (typeof value.url === "string") {
500
+ try {
501
+ const url = new URL(value.url);
502
+ if (url.protocol === "https:" || url.protocol === "http:") {
503
+ result.url = redactFailureText(`${url.origin}${url.pathname}`, 1e3);
504
+ }
505
+ } catch (e3) {
506
+ }
507
+ }
508
+ if (typeof value.failedAtUtc === "string" && Number.isFinite(Date.parse(value.failedAtUtc))) {
509
+ result.failedAtUtc = new Date(value.failedAtUtc).toISOString();
510
+ }
511
+ for (const key of ["elapsedMs", "attempts"]) {
512
+ const number = value[key];
513
+ if (typeof number === "number" && Number.isSafeInteger(number) && number >= 0)
514
+ result[key] = number;
515
+ }
516
+ return Object.keys(result).length > 0 ? result : null;
517
+ }
518
+ function buildFailureReport(input) {
519
+ const durationMs = Math.max(0, Date.now() - input.startedAtMs);
520
+ const request = safeRequestDiagnostics(input.error);
521
+ const failureKind = resolvedFailureKind({
522
+ exitCode: input.exitCode,
523
+ error: input.error
524
+ });
525
+ const code = failureCode({ exitCode: input.exitCode, error: input.error });
526
+ const errorBody = input.error === void 0 ? `SDK CLI command exited ${_nullishCoalesce(input.exitCode, () => ( "unknown"))}` : errorMessage(input.error);
527
+ const networkCauseCategory = input.error !== void 0 && isNetworkFailure(input.error) ? classifyNetworkCauseCategory(input.error) : null;
528
+ return {
529
+ command: sanitizeCommand(input.argv),
530
+ subcommand: subcommandFromArgv(input.argv),
531
+ error_status: input.exitCode,
532
+ error_body: redactFailureText(errorBody),
533
+ exit_code: input.exitCode,
534
+ duration_ms: durationMs,
535
+ error_class: input.error instanceof Error ? input.error.name : null,
536
+ stack_trace: errorStack(input.error),
537
+ failure_kind: failureKind,
538
+ failure_code: code,
539
+ failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
540
+ cli_version: _chunk3PMCQ3LKjs.SDK_VERSION,
541
+ context: {
542
+ base_url: redactFailureText(input.baseUrl, 400),
543
+ command_summary: sanitizeCommand(input.argv),
544
+ environment: buildEnvironmentContext(),
545
+ ...request ? { request } : {},
546
+ failure_kind: failureKind,
547
+ failure_code: code,
548
+ failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
549
+ duration_ms: durationMs,
550
+ ...input.exitCode !== null ? { exit_code: input.exitCode } : {},
551
+ ...networkCauseCategory ? { network_cause_category: networkCauseCategory } : {}
552
+ }
553
+ };
554
+ }
555
+ async function maybeReportSdkCliFailure(input) {
556
+ if (isFailureReportingDisabled()) return false;
557
+ if (isServerLoggedPlayRunStartFailure(input)) return false;
558
+ const exitCode = resolvedExitCode(input);
559
+ if (!shouldReport({ exitCode, error: input.error })) return false;
560
+ const baseUrl = _chunkPU42VOBIjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
561
+ const apiKey = _chunkPU42VOBIjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
562
+ if (!apiKey) return false;
563
+ return postFailureReport({
564
+ baseUrl,
565
+ apiKey,
566
+ timeoutMs: REPORT_FAILURE_TIMEOUT_MS,
567
+ body: buildFailureReport({
568
+ argv: input.argv,
569
+ startedAtMs: input.startedAtMs,
570
+ error: input.error,
571
+ exitCode,
572
+ baseUrl
573
+ })
574
+ });
575
+ }
576
+
189
577
  // src/cli/utils.ts
190
578
  var _crypto = require('crypto');
191
579
 
@@ -196,7 +584,7 @@ var _crypto = require('crypto');
196
584
 
197
585
  var _fs = require('fs');
198
586
  var _promises = require('fs/promises');
199
- var _os = require('os');
587
+
200
588
  var _path = require('path');
201
589
  var _child_process = require('child_process'); var childProcess = _interopRequireWildcard(_child_process);
202
590
  var _sync = require('csv-parse/sync');
@@ -255,7 +643,7 @@ function decodeAs(run, toByte) {
255
643
  if (!bytes.subarray(0, i).some((b) => b >= 194 && b <= 244)) return null;
256
644
  try {
257
645
  return STRICT_UTF8.decode(bytes.subarray(0, i));
258
- } catch (e) {
646
+ } catch (e4) {
259
647
  return null;
260
648
  }
261
649
  }
@@ -294,15 +682,15 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
294
682
  var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
295
683
  var defaultBrowserCommandRunner = childProcess;
296
684
  function getAuthedHttpClient() {
297
- const config = _chunkHWPOXCCKjs.resolveConfig.call(void 0, );
298
- return { config, http: new (0, _chunkHWPOXCCKjs.HttpClient)(config) };
685
+ const config = _chunkPU42VOBIjs.resolveConfig.call(void 0, );
686
+ return { config, http: new (0, _chunkPU42VOBIjs.HttpClient)(config) };
299
687
  }
300
688
  function stableOsUserId() {
301
689
  try {
302
690
  const info = _os.userInfo.call(void 0, );
303
691
  if (typeof info.uid === "number") return `uid-${info.uid}`;
304
692
  if (info.username) return `user-${info.username}`;
305
- } catch (e2) {
693
+ } catch (e5) {
306
694
  }
307
695
  return "unknown-user";
308
696
  }
@@ -329,7 +717,7 @@ function claimBrowserOpen(now = Date.now(), stateDir, targetUrl) {
329
717
  try {
330
718
  _fs.mkdirSync.call(void 0, lockPath, { mode: 448 });
331
719
  locked = true;
332
- } catch (e3) {
720
+ } catch (e6) {
333
721
  return false;
334
722
  }
335
723
  let lastOpenedAt = 0;
@@ -358,7 +746,7 @@ function claimBrowserOpen(now = Date.now(), stateDir, targetUrl) {
358
746
  { encoding: "utf-8", mode: 384 }
359
747
  );
360
748
  return true;
361
- } catch (e4) {
749
+ } catch (e7) {
362
750
  return true;
363
751
  } finally {
364
752
  if (locked) {
@@ -370,7 +758,7 @@ function extractUrlHost(raw) {
370
758
  try {
371
759
  const parsed = new URL(raw.includes("://") ? raw : `https://${raw}`);
372
760
  return parsed.port ? `${parsed.hostname.toLowerCase()}:${parsed.port}` : parsed.hostname.toLowerCase();
373
- } catch (e5) {
761
+ } catch (e8) {
374
762
  return "";
375
763
  }
376
764
  }
@@ -391,7 +779,7 @@ function browserAppNameFromBundleId(bundleId) {
391
779
  function currentOsUsername() {
392
780
  try {
393
781
  return _os.userInfo.call(void 0, ).username || "";
394
- } catch (e6) {
782
+ } catch (e9) {
395
783
  return "";
396
784
  }
397
785
  }
@@ -405,9 +793,9 @@ function readMacosUserHome(runner = defaultBrowserCommandRunner) {
405
793
  { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }
406
794
  );
407
795
  const match = String(output).match(/NFSHomeDirectory:\s*(.+)\s*$/m);
408
- const home = _optionalChain([match, 'optionalAccess', _2 => _2[1], 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]);
796
+ const home = _optionalChain([match, 'optionalAccess', _30 => _30[1], 'optionalAccess', _31 => _31.trim, 'call', _32 => _32()]);
409
797
  if (home) return home;
410
- } catch (e7) {
798
+ } catch (e10) {
411
799
  }
412
800
  }
413
801
  return _os.homedir.call(void 0, );
@@ -441,7 +829,7 @@ function readDefaultMacBrowserBundleId(runner = defaultBrowserCommandRunner) {
441
829
  return "";
442
830
  };
443
831
  return pickBundle("https") || pickBundle("http");
444
- } catch (e8) {
832
+ } catch (e11) {
445
833
  return "";
446
834
  }
447
835
  }
@@ -557,7 +945,7 @@ function hasOnlyHeadlessMacosBrowserInstances(appName, runner = defaultBrowserCo
557
945
  return lines.every(
558
946
  (line) => line.includes("--headless") || line.includes("--no-startup-window")
559
947
  );
560
- } catch (e9) {
948
+ } catch (e12) {
561
949
  return false;
562
950
  }
563
951
  }
@@ -571,7 +959,7 @@ function openNewVisibleMacosBrowserInstance(appName, targetUrl, runner = default
571
959
  }
572
960
  );
573
961
  return true;
574
- } catch (e10) {
962
+ } catch (e13) {
575
963
  return false;
576
964
  }
577
965
  }
@@ -593,7 +981,7 @@ function openUrlMacos(targetUrl, allowFocus, runner = defaultBrowserCommandRunne
593
981
  stdio: "ignore"
594
982
  });
595
983
  return true;
596
- } catch (e11) {
984
+ } catch (e14) {
597
985
  return false;
598
986
  }
599
987
  }
@@ -622,7 +1010,7 @@ function openInBrowser(url, options = {}) {
622
1010
  }
623
1011
  childProcess.execFileSync("xdg-open", [targetUrl], { stdio: "ignore" });
624
1012
  return "opened";
625
- } catch (e12) {
1013
+ } catch (e15) {
626
1014
  return "failed";
627
1015
  }
628
1016
  }
@@ -630,12 +1018,12 @@ function sleep(ms) {
630
1018
  return new Promise((resolvePromise) => setTimeout(resolvePromise, ms));
631
1019
  }
632
1020
  function collectLocalEnvInfo() {
633
- const homeDir = _optionalChain([process, 'access', _5 => _5.env, 'access', _6 => _6.HOME, 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]) || _os.homedir.call(void 0, );
1021
+ const homeDir = _optionalChain([process, 'access', _33 => _33.env, 'access', _34 => _34.HOME, 'optionalAccess', _35 => _35.trim, 'call', _36 => _36()]) || _os.homedir.call(void 0, );
634
1022
  const info = {
635
1023
  os: `${process.platform} ${process.arch}`,
636
1024
  node_version: process.version,
637
1025
  home_dir: homeDir,
638
- agent_runtime: _chunkD4MHCCIRjs.detectAgentRuntime.call(void 0, )
1026
+ agent_runtime: _chunk3PMCQ3LKjs.detectAgentRuntime.call(void 0, )
639
1027
  };
640
1028
  const env = process.env;
641
1029
  const optional = {
@@ -643,15 +1031,15 @@ function collectLocalEnvInfo() {
643
1031
  deepline_plugin_mode: env.DEEPLINE_PLUGIN_MODE
644
1032
  };
645
1033
  for (const [key, value] of Object.entries(optional)) {
646
- if (_optionalChain([value, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()])) info[key] = value.trim();
1034
+ if (_optionalChain([value, 'optionalAccess', _37 => _37.trim, 'call', _38 => _38()])) info[key] = value.trim();
647
1035
  }
648
- if (_optionalChain([env, 'access', _11 => _11.CLAUDE_PROJECT_DIR, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()])) {
1036
+ if (_optionalChain([env, 'access', _39 => _39.CLAUDE_PROJECT_DIR, 'optionalAccess', _40 => _40.trim, 'call', _41 => _41()])) {
649
1037
  info.claude_project_dir_present = "true";
650
1038
  }
651
- if (_optionalChain([env, 'access', _14 => _14.DEEPLINE_PLUGIN_ROOT, 'optionalAccess', _15 => _15.trim, 'call', _16 => _16()])) {
1039
+ if (_optionalChain([env, 'access', _42 => _42.DEEPLINE_PLUGIN_ROOT, 'optionalAccess', _43 => _43.trim, 'call', _44 => _44()])) {
652
1040
  info.deepline_plugin_root_present = "true";
653
1041
  }
654
- if (_optionalChain([env, 'access', _17 => _17.DEEPLINE_PLUGIN_SKILLS_DIR, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()])) {
1042
+ if (_optionalChain([env, 'access', _45 => _45.DEEPLINE_PLUGIN_SKILLS_DIR, 'optionalAccess', _46 => _46.trim, 'call', _47 => _47()])) {
655
1043
  info.deepline_plugin_skills_dir_present = "true";
656
1044
  }
657
1045
  if (info.home_dir === "/sessions" || info.home_dir.startsWith("/sessions/")) {
@@ -670,7 +1058,7 @@ function readCsvRows(csvPath) {
670
1058
  });
671
1059
  }
672
1060
  function csvStringFromRows(rows, columns) {
673
- const effectiveColumns = _optionalChain([columns, 'optionalAccess', _20 => _20.length]) ? columns : Object.keys(_nullishCoalesce(rows[0], () => ( {})));
1061
+ const effectiveColumns = _optionalChain([columns, 'optionalAccess', _48 => _48.length]) ? columns : Object.keys(_nullishCoalesce(rows[0], () => ( {})));
674
1062
  if (!effectiveColumns.length) {
675
1063
  return _sync3.stringify.call(void 0,
676
1064
  rows.map(() => ({})),
@@ -733,7 +1121,7 @@ function csvSafeJsonString(value) {
733
1121
  try {
734
1122
  const serialized = JSON.stringify(value, csvSafeJsonReplacer);
735
1123
  return _nullishCoalesce(serialized, () => ( null));
736
- } catch (e13) {
1124
+ } catch (e16) {
737
1125
  return String(value);
738
1126
  }
739
1127
  }
@@ -747,7 +1135,7 @@ function parseMaybeJsonObject(value) {
747
1135
  }
748
1136
  try {
749
1137
  return JSON.parse(trimmed);
750
- } catch (e14) {
1138
+ } catch (e17) {
751
1139
  return value;
752
1140
  }
753
1141
  }
@@ -755,7 +1143,7 @@ function failureMessageFromRecord(value) {
755
1143
  const status = typeof value.status === "string" ? value.status.trim().toLowerCase() : "";
756
1144
  const directError = typeof value.error === "string" ? value.error.trim() : typeof value.last_error === "string" ? value.last_error.trim() : "";
757
1145
  const result = value.result && typeof value.result === "object" && !Array.isArray(value.result) ? value.result : null;
758
- const resultError = typeof _optionalChain([result, 'optionalAccess', _21 => _21.error]) === "string" ? result.error.trim() : typeof _optionalChain([result, 'optionalAccess', _22 => _22.message]) === "string" ? result.message.trim() : "";
1146
+ const resultError = typeof _optionalChain([result, 'optionalAccess', _49 => _49.error]) === "string" ? result.error.trim() : typeof _optionalChain([result, 'optionalAccess', _50 => _50.message]) === "string" ? result.message.trim() : "";
759
1147
  if (!directError && !resultError && status !== "error" && status !== "failed") {
760
1148
  return null;
761
1149
  }
@@ -882,9 +1270,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
882
1270
  }
883
1271
  function withAgentCommandContext(value) {
884
1272
  const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
885
- return _chunkD4MHCCIRjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
1273
+ return _chunk3PMCQ3LKjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
886
1274
  ...valueRecord,
887
- command_context: _chunkHWPOXCCKjs.resolveCliCommandContext.call(void 0, )
1275
+ command_context: _chunkPU42VOBIjs.resolveCliCommandContext.call(void 0, )
888
1276
  } : value;
889
1277
  }
890
1278
  function printJson(value, fields) {
@@ -900,63 +1288,131 @@ function printCompactJson(value) {
900
1288
  );
901
1289
  }
902
1290
  function cliToolExecutionFailure(error) {
903
- const failure = _chunkSQWET4SLjs.serializeToolExecutionFailure.call(void 0, error);
1291
+ const failure = _chunkBBTKAASQjs.serializeToolExecutionFailure.call(void 0, error);
904
1292
  if (!failure) return null;
905
1293
  const { publicDetails: _publicDetails, ...facts } = failure;
906
1294
  return facts;
907
1295
  }
1296
+ var UPSTREAM_BODY_EXCERPT_CHARS = 300;
1297
+ var UPSTREAM_BODY_MAX_DEPTH = 6;
1298
+ var CREDENTIAL_FIELD_RE = /(?:^|[-_])(?:auth|key|sig(?:nature)?|session)$|api[-_]?key|apikey|access[-_]?key|private|token|secret|passw(?:or)?d|authorization|cookie|credential|bearer/i;
1299
+ var TRANSIENT_CLIENT_ERROR_STATUSES = /* @__PURE__ */ new Set([408, 425, 429]);
1300
+ function maskCredentialFields(value, depth = 0) {
1301
+ if (value === null || typeof value !== "object") return value;
1302
+ if (depth >= UPSTREAM_BODY_MAX_DEPTH) return "[nested]";
1303
+ if (Array.isArray(value)) {
1304
+ return value.map((entry) => maskCredentialFields(entry, depth + 1));
1305
+ }
1306
+ return Object.fromEntries(
1307
+ Object.entries(value).map(([key, entry]) => [
1308
+ key,
1309
+ CREDENTIAL_FIELD_RE.test(key) ? "[redacted-secret]" : maskCredentialFields(entry, depth + 1)
1310
+ ])
1311
+ );
1312
+ }
1313
+ function formatUpstreamBodyExcerpt(body) {
1314
+ let value = body;
1315
+ if (typeof value === "string") {
1316
+ const trimmed = value.trim();
1317
+ if (!trimmed) return "(empty body)";
1318
+ try {
1319
+ value = JSON.parse(trimmed);
1320
+ } catch (e18) {
1321
+ value = trimmed;
1322
+ }
1323
+ }
1324
+ if (value === null || value === void 0) return "(empty body)";
1325
+ let text;
1326
+ try {
1327
+ text = typeof value === "string" ? value : _nullishCoalesce(JSON.stringify(maskCredentialFields(value)), () => ( String(value)));
1328
+ } catch (e19) {
1329
+ text = String(value);
1330
+ }
1331
+ const redacted = redactFailureText(text, Number.MAX_SAFE_INTEGER).replace(/\s+/g, " ").trim();
1332
+ if (!redacted) return "(empty body)";
1333
+ return redacted.length > UPSTREAM_BODY_EXCERPT_CHARS ? `${redacted.slice(0, UPSTREAM_BODY_EXCERPT_CHARS)}\u2026 (full body: rerun with --json)` : redacted;
1334
+ }
1335
+ function permanentProviderFailureLine(status, connectedCredential) {
1336
+ if (typeof status !== "number" || status < 400 || status >= 500) return null;
1337
+ if (TRANSIENT_CLIENT_ERROR_STATUSES.has(status)) return null;
1338
+ if (connectedCredential && (status === 401 || status === 403)) {
1339
+ return "Permanent: the provider refused this credential or its permissions. Check the connected key and its plan before retrying.";
1340
+ }
1341
+ return "Permanent: the provider rejected this request. Retrying it unchanged will fail again.";
1342
+ }
908
1343
  function formatToolExecutionErrorDiagnostic(error) {
909
- const failure = cliToolExecutionFailure(error);
910
- if (!failure) return null;
911
- const lines = [
912
- `Tool: ${failure.toolId}${failure.provider ? `; provider: ${failure.provider}` : ""}${failure.operation ? `; operation: ${failure.operation}` : ""}.`,
913
- `Failure: ${failure.origin} / ${failure.category}. Same-call retry: ${failure.retryable ? `safe${failure.retryAfterMs === null ? "" : ` after ${failure.retryAfterMs}ms`}` : "unsafe"}.`
914
- ];
915
- if (failure.networkKind || failure.networkScope) {
1344
+ return formatCliFailureDiagnostic(errorToJsonPayload(error).error);
1345
+ }
1346
+ function formatCliFailureDiagnostic(error) {
1347
+ if (error === null || typeof error !== "object") return null;
1348
+ const record = error;
1349
+ const failure = _chunkBBTKAASQjs.normalizeToolExecutionFailure.call(void 0, record.tool_error);
1350
+ const upstreamResponse = _chunkBBTKAASQjs.readToolUpstreamResponse.call(void 0, record);
1351
+ if (!failure && !upstreamResponse) return null;
1352
+ const lines = [];
1353
+ if (failure) {
1354
+ lines.push(
1355
+ `Tool: ${failure.toolId}${failure.provider ? `; provider: ${failure.provider}` : ""}${failure.operation ? `; operation: ${failure.operation}` : ""}.`,
1356
+ `Failure: ${failure.origin} / ${failure.category}. Same-call retry: ${failure.retryable ? `safe${failure.retryAfterMs === null ? "" : ` after ${failure.retryAfterMs}ms`}` : "unsafe"}.`
1357
+ );
1358
+ }
1359
+ if (upstreamResponse) {
1360
+ lines.push(
1361
+ `Provider response: HTTP ${upstreamResponse.status}: ${formatUpstreamBodyExcerpt(upstreamResponse.body)}`
1362
+ );
1363
+ }
1364
+ if (!failure || failure.origin === "provider" && !failure.retryable) {
1365
+ const permanent = permanentProviderFailureLine(
1366
+ _nullishCoalesce(_optionalChain([upstreamResponse, 'optionalAccess', _51 => _51.status]), () => ( _optionalChain([failure, 'optionalAccess', _52 => _52.statusCode]))),
1367
+ upstreamResponse !== null && upstreamResponse !== void 0
1368
+ );
1369
+ if (permanent) lines.push(permanent);
1370
+ }
1371
+ if (_optionalChain([failure, 'optionalAccess', _53 => _53.networkKind]) || _optionalChain([failure, 'optionalAccess', _54 => _54.networkScope])) {
916
1372
  lines.push(
917
1373
  `Network: ${_nullishCoalesce(failure.networkKind, () => ( "unknown"))}${failure.networkScope ? ` (${failure.networkScope})` : ""}.`
918
1374
  );
919
1375
  }
920
- if (failure.requestId) lines.push(`Request: ${failure.requestId}.`);
1376
+ if (_optionalChain([failure, 'optionalAccess', _55 => _55.requestId])) lines.push(`Request: ${failure.requestId}.`);
921
1377
  return lines.join("\n");
922
1378
  }
923
1379
  function errorToJsonPayload(error) {
924
1380
  const message = error instanceof Error ? error.message : String(error);
925
1381
  const toolFailure = cliToolExecutionFailure(error);
926
- const upstreamResponse = _chunkSQWET4SLjs.readToolUpstreamResponse.call(void 0, error);
1382
+ const upstreamResponse = _chunkBBTKAASQjs.readToolUpstreamResponse.call(void 0, error);
927
1383
  const maybeRecord = error && typeof error === "object" ? error : null;
928
- const code = typeof _optionalChain([maybeRecord, 'optionalAccess', _23 => _23.code]) === "string" ? maybeRecord.code : error instanceof SyntaxError ? "INVALID_JSON" : "CLI_ERROR";
1384
+ const code = typeof _optionalChain([maybeRecord, 'optionalAccess', _56 => _56.code]) === "string" ? maybeRecord.code : error instanceof SyntaxError ? "INVALID_JSON" : "CLI_ERROR";
929
1385
  const details = {};
930
- const exitCode = typeof _optionalChain([maybeRecord, 'optionalAccess', _24 => _24.exitCode]) === "number" ? maybeRecord.exitCode : void 0;
931
- if (typeof _optionalChain([maybeRecord, 'optionalAccess', _25 => _25.statusCode]) === "number") {
1386
+ const exitCode = typeof _optionalChain([maybeRecord, 'optionalAccess', _57 => _57.exitCode]) === "number" ? maybeRecord.exitCode : void 0;
1387
+ if (typeof _optionalChain([maybeRecord, 'optionalAccess', _58 => _58.statusCode]) === "number") {
932
1388
  details.statusCode = maybeRecord.statusCode;
933
1389
  }
934
- if (typeof _optionalChain([maybeRecord, 'optionalAccess', _26 => _26.status]) === "number") {
1390
+ if (typeof _optionalChain([maybeRecord, 'optionalAccess', _59 => _59.status]) === "number") {
935
1391
  details.status = maybeRecord.status;
936
1392
  }
937
- if (typeof _optionalChain([maybeRecord, 'optionalAccess', _27 => _27.requestId]) === "string" || _optionalChain([maybeRecord, 'optionalAccess', _28 => _28.requestId]) === null) {
1393
+ if (typeof _optionalChain([maybeRecord, 'optionalAccess', _60 => _60.requestId]) === "string" || _optionalChain([maybeRecord, 'optionalAccess', _61 => _61.requestId]) === null) {
938
1394
  details.requestId = maybeRecord.requestId;
939
1395
  }
940
- if (typeof _optionalChain([maybeRecord, 'optionalAccess', _29 => _29.retryable]) === "boolean") {
1396
+ if (typeof _optionalChain([maybeRecord, 'optionalAccess', _62 => _62.retryable]) === "boolean") {
941
1397
  details.retryable = maybeRecord.retryable;
942
1398
  }
943
- if (_optionalChain([maybeRecord, 'optionalAccess', _30 => _30.publicDetails]) && typeof maybeRecord.publicDetails === "object" && !Array.isArray(maybeRecord.publicDetails)) {
1399
+ if (_optionalChain([maybeRecord, 'optionalAccess', _63 => _63.publicDetails]) && typeof maybeRecord.publicDetails === "object" && !Array.isArray(maybeRecord.publicDetails)) {
944
1400
  details.publicDetails = maybeRecord.publicDetails;
945
1401
  }
946
- if (_optionalChain([maybeRecord, 'optionalAccess', _31 => _31.details]) && typeof maybeRecord.details === "object" && !Array.isArray(maybeRecord.details)) {
1402
+ if (_optionalChain([maybeRecord, 'optionalAccess', _64 => _64.details]) && typeof maybeRecord.details === "object" && !Array.isArray(maybeRecord.details)) {
947
1403
  details.details = maybeRecord.details;
948
1404
  }
949
- if (_optionalChain([maybeRecord, 'optionalAccess', _32 => _32.guidance]) && typeof maybeRecord.guidance === "object" && !Array.isArray(maybeRecord.guidance)) {
1405
+ if (_optionalChain([maybeRecord, 'optionalAccess', _65 => _65.guidance]) && typeof maybeRecord.guidance === "object" && !Array.isArray(maybeRecord.guidance)) {
950
1406
  details.guidance = maybeRecord.guidance;
951
1407
  }
952
1408
  const providerConcurrency = providerConcurrencyDiagnostic(maybeRecord);
953
1409
  if (providerConcurrency) {
954
1410
  details.providerConcurrency = providerConcurrency;
955
1411
  }
956
- if (typeof _optionalChain([maybeRecord, 'optionalAccess', _33 => _33.cause]) === "string") {
1412
+ if (typeof _optionalChain([maybeRecord, 'optionalAccess', _66 => _66.cause]) === "string") {
957
1413
  details.cause = maybeRecord.cause;
958
1414
  }
959
- const statusCode = typeof _optionalChain([maybeRecord, 'optionalAccess', _34 => _34.statusCode]) === "number" ? maybeRecord.statusCode : typeof _optionalChain([maybeRecord, 'optionalAccess', _35 => _35.status]) === "number" ? maybeRecord.status : _nullishCoalesce(_optionalChain([toolFailure, 'optionalAccess', _36 => _36.statusCode]), () => ( void 0));
1415
+ const statusCode = typeof _optionalChain([maybeRecord, 'optionalAccess', _67 => _67.statusCode]) === "number" ? maybeRecord.statusCode : typeof _optionalChain([maybeRecord, 'optionalAccess', _68 => _68.status]) === "number" ? maybeRecord.status : _nullishCoalesce(_optionalChain([toolFailure, 'optionalAccess', _69 => _69.statusCode]), () => ( void 0));
960
1416
  return {
961
1417
  ok: false,
962
1418
  status: "failed",
@@ -1018,12 +1474,12 @@ function clip(value, maxLength) {
1018
1474
  // src/cli/command-envelope.ts
1019
1475
  function renderSections(render) {
1020
1476
  const lines = [];
1021
- for (const section of _nullishCoalesce(_optionalChain([render, 'optionalAccess', _37 => _37.sections]), () => ( []))) {
1477
+ for (const section of _nullishCoalesce(_optionalChain([render, 'optionalAccess', _70 => _70.sections]), () => ( []))) {
1022
1478
  if (!section.title || section.lines.length === 0) continue;
1023
1479
  lines.push(section.title);
1024
1480
  lines.push(...section.lines.map((line) => ` ${line}`));
1025
1481
  }
1026
- for (const action of _nullishCoalesce(_optionalChain([render, 'optionalAccess', _38 => _38.actions]), () => ( []))) {
1482
+ for (const action of _nullishCoalesce(_optionalChain([render, 'optionalAccess', _71 => _71.actions]), () => ( []))) {
1027
1483
  if (!action.label || !action.command) continue;
1028
1484
  lines.push(`${action.label}: ${action.command}`);
1029
1485
  }
@@ -1081,4 +1537,12 @@ function printCommandEnvelope(envelope, options = {}) {
1081
1537
 
1082
1538
 
1083
1539
 
1084
- exports.parseJsonFields = parseJsonFields; exports.jsonFieldArgs = jsonFieldArgs; exports.describeArgs = describeArgs; exports.isJsonOutputMode = isJsonOutputMode; exports.installJsonStderrGuard = installJsonStderrGuard; exports.addJsonNotice = addJsonNotice; exports.writeRawStderr = writeRawStderr; exports.markJsonOutputHandled = markJsonOutputHandled; exports.takeSilentJsonFailureMessage = takeSilentJsonFailureMessage; exports.getAuthedHttpClient = getAuthedHttpClient; exports.openInBrowser = openInBrowser; exports.sleep = sleep; exports.collectLocalEnvInfo = collectLocalEnvInfo; exports.readCsvRows = readCsvRows; exports.csvStringFromRows = csvStringFromRows; exports.csvSafeJsonString = csvSafeJsonString; exports.recordRows = recordRows; exports.dataExportRows = dataExportRows; exports.dataExportColumns = dataExportColumns; exports.dataExportCsvString = dataExportCsvString; exports.markdownTableFromRows = markdownTableFromRows; exports.printJson = printJson; exports.printCompactJson = printCompactJson; exports.formatToolExecutionErrorDiagnostic = formatToolExecutionErrorDiagnostic; exports.errorToJsonPayload = errorToJsonPayload; exports.formatProviderConcurrencyDiagnostic = formatProviderConcurrencyDiagnostic; exports.printJsonError = printJsonError; exports.shouldEmitJson = shouldEmitJson; exports.argsWantJson = argsWantJson; exports.createTimestampedName = createTimestampedName; exports.clip = clip; exports.renderCommandEnvelopeText = renderCommandEnvelopeText; exports.printCommandEnvelope = printCommandEnvelope;
1540
+
1541
+
1542
+
1543
+
1544
+
1545
+
1546
+
1547
+
1548
+ exports.parseJsonFields = parseJsonFields; exports.jsonFieldArgs = jsonFieldArgs; exports.describeArgs = describeArgs; exports.isJsonOutputMode = isJsonOutputMode; exports.installJsonStderrGuard = installJsonStderrGuard; exports.addJsonNotice = addJsonNotice; exports.writeRawStderr = writeRawStderr; exports.markJsonOutputHandled = markJsonOutputHandled; exports.takeSilentJsonFailureMessage = takeSilentJsonFailureMessage; exports.isFailureReportingDisabled = isFailureReportingDisabled; exports.redactFailureText = redactFailureText; exports.sanitizeCommand = sanitizeCommand; exports.failureReportHeaders = failureReportHeaders; exports.maybeReportAutomaticSkillsSyncFailure = maybeReportAutomaticSkillsSyncFailure; exports.resolveSdkCliFailureExitCode = resolveSdkCliFailureExitCode; exports.maybeReportSdkCliFailure = maybeReportSdkCliFailure; exports.getAuthedHttpClient = getAuthedHttpClient; exports.openInBrowser = openInBrowser; exports.sleep = sleep; exports.collectLocalEnvInfo = collectLocalEnvInfo; exports.readCsvRows = readCsvRows; exports.csvStringFromRows = csvStringFromRows; exports.csvSafeJsonString = csvSafeJsonString; exports.recordRows = recordRows; exports.dataExportRows = dataExportRows; exports.dataExportColumns = dataExportColumns; exports.dataExportCsvString = dataExportCsvString; exports.markdownTableFromRows = markdownTableFromRows; exports.printJson = printJson; exports.printCompactJson = printCompactJson; exports.formatToolExecutionErrorDiagnostic = formatToolExecutionErrorDiagnostic; exports.formatCliFailureDiagnostic = formatCliFailureDiagnostic; exports.errorToJsonPayload = errorToJsonPayload; exports.formatProviderConcurrencyDiagnostic = formatProviderConcurrencyDiagnostic; exports.printJsonError = printJsonError; exports.shouldEmitJson = shouldEmitJson; exports.argsWantJson = argsWantJson; exports.createTimestampedName = createTimestampedName; exports.clip = clip; exports.renderCommandEnvelopeText = renderCommandEnvelopeText; exports.printCommandEnvelope = printCommandEnvelope;