deepline 0.3.409 → 0.3.410

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 (213) hide show
  1. package/dist/bundling-sources/sdk/src/agent-runtime.ts +18 -1
  2. package/dist/bundling-sources/sdk/src/client.ts +206 -333
  3. package/dist/bundling-sources/sdk/src/compat.ts +45 -2
  4. package/dist/bundling-sources/sdk/src/db/query.ts +9 -10
  5. package/dist/bundling-sources/sdk/src/http.ts +38 -20
  6. package/dist/bundling-sources/sdk/src/index.ts +4 -5
  7. package/dist/bundling-sources/sdk/src/play.ts +10 -10
  8. package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +6 -4
  9. package/dist/bundling-sources/sdk/src/plays/check-local-play-graph.ts +114 -0
  10. package/dist/bundling-sources/sdk/src/plays/client.ts +431 -0
  11. package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +2 -2
  12. package/dist/bundling-sources/sdk/src/plays/run-request.ts +106 -16
  13. package/dist/bundling-sources/sdk/src/release.ts +13 -7
  14. package/dist/bundling-sources/sdk/src/runs/read-errors.ts +8 -0
  15. package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +124 -13
  16. package/dist/bundling-sources/sdk/src/tool-calls.ts +108 -19
  17. package/dist/bundling-sources/sdk/src/types.ts +18 -0
  18. package/dist/bundling-sources/shared_libs/integration-contracts/execute-retry-contract.ts +37 -0
  19. package/dist/bundling-sources/shared_libs/integration-contracts/package.json +3 -0
  20. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +3 -1
  21. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +277 -76
  22. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/dataset-row-input.ts +124 -0
  24. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +6 -62
  25. package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +1 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +67 -0
  27. package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +64 -6
  28. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +1 -5
  29. package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +1 -1
  30. package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +3 -0
  31. package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +10 -0
  32. package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +3 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/egress-probe.ts +3 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +26 -16
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +36 -11
  36. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +35 -0
  37. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +21 -0
  38. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +21 -6
  39. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +11 -2
  40. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +85 -20
  41. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +71 -13
  42. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-execution-queries.ts +100 -0
  43. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +9 -5
  44. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +337 -146
  45. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +26 -12
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +3 -1
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +425 -102
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +4 -0
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +9 -0
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +181 -124
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +152 -0
  53. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +5 -3
  54. package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +31 -0
  55. package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +10 -0
  56. package/dist/bundling-sources/shared_libs/plays/ambiguous-write-error.ts +25 -0
  57. package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +4 -0
  58. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +63 -68
  59. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +129 -63
  60. package/dist/bundling-sources/shared_libs/plays/contracts.ts +14 -0
  61. package/dist/bundling-sources/shared_libs/plays/enrich-play-compiler.ts +58 -16
  62. package/dist/bundling-sources/shared_libs/plays/fetch-http-error.ts +50 -0
  63. package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +351 -0
  64. package/dist/bundling-sources/shared_libs/plays/tool-list-getter-mode.ts +9 -0
  65. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
  66. package/dist/cli/{auth-5HIIACF7.mjs → auth-LLXLIILR.mjs} +6 -6
  67. package/dist/cli/auth-UG4WOYGL.js +40 -0
  68. package/dist/cli/{billing-EVZ3ZWKC.mjs → billing-5FVXZYAC.mjs} +8 -8
  69. package/dist/cli/{billing-4275N7FL.js → billing-NFPK7GYP.js} +84 -84
  70. package/dist/cli/{chunk-ZAAKSJAS.js → chunk-27GJKC5Q.js} +17 -10
  71. package/dist/cli/{chunk-UHNDVD3P.js → chunk-2H4EY7KH.js} +100 -41
  72. package/dist/cli/{chunk-TQNHMWUR.mjs → chunk-2YR7BIIC.mjs} +5 -2
  73. package/dist/cli/{chunk-AU4OFDFX.js → chunk-36AHOWVS.js} +26 -26
  74. package/dist/cli/{chunk-OSDXE27V.mjs → chunk-4PG4ARL2.mjs} +17 -10
  75. package/dist/cli/{chunk-PBZYY7VZ.mjs → chunk-4XQLVUC7.mjs} +734 -511
  76. package/dist/cli/chunk-5TUGWDEB.js +313 -0
  77. package/dist/cli/{chunk-DEC3JECC.js → chunk-5UUQAGJS.js} +5 -2
  78. package/dist/cli/{chunk-JRAVVJ3T.mjs → chunk-5V5Y37BC.mjs} +2 -2
  79. package/dist/cli/{chunk-PMVFAYL7.mjs → chunk-63ILLN5H.mjs} +2 -2
  80. package/dist/cli/{chunk-V76R6HMV.js → chunk-63S7X326.js} +1029 -806
  81. package/dist/cli/{chunk-VWBTTJYQ.mjs → chunk-6PGATQ6L.mjs} +6 -3
  82. package/dist/cli/{chunk-6BJK4EJ3.mjs → chunk-AARWVK4C.mjs} +2132 -65
  83. package/dist/cli/{chunk-FERRDNMO.js → chunk-AD47BXN2.js} +5 -5
  84. package/dist/cli/{chunk-GAICVLKL.js → chunk-D37FEBES.js} +2 -2
  85. package/dist/cli/{chunk-S6R3OX7B.js → chunk-E4CABWXL.js} +25 -2
  86. package/dist/cli/{chunk-NXGCO4JB.mjs → chunk-E4IXDAZI.mjs} +5 -0
  87. package/dist/cli/chunk-EQ4Z7RJW.mjs +35 -0
  88. package/dist/cli/chunk-FR2ILQ4G.mjs +8 -0
  89. package/dist/cli/{chunk-FJCIUF34.js → chunk-FVLNYDI4.js} +128 -376
  90. package/dist/cli/{chunk-O3VSXP2F.js → chunk-FZJAM576.js} +50 -50
  91. package/dist/cli/{chunk-BZAMOCPA.mjs → chunk-IMZ56EOH.mjs} +3 -3
  92. package/dist/cli/{chunk-N44JHMKY.mjs → chunk-IPG42SD2.mjs} +452 -138
  93. package/dist/cli/chunk-J33TSWO5.js +8 -0
  94. package/dist/cli/{chunk-BEVLCKXG.mjs → chunk-JNXJZ577.mjs} +1 -1
  95. package/dist/cli/{chunk-JI2B4RZP.mjs → chunk-KCC3FKIW.mjs} +71 -12
  96. package/dist/cli/{chunk-6IKARAYD.mjs → chunk-L2VKAASU.mjs} +23 -0
  97. package/dist/cli/{chunk-WLOCMJWV.js → chunk-LTFL4JRN.js} +426 -721
  98. package/dist/cli/{chunk-YHPYUZZX.mjs → chunk-MAMVGOSC.mjs} +1 -1
  99. package/dist/cli/{chunk-NZSF57UO.mjs → chunk-MN2OWLFA.mjs} +2 -2
  100. package/dist/cli/{chunk-YD7B53RW.js → chunk-NF4V5DTY.js} +12 -12
  101. package/dist/cli/{chunk-Q2E4E4FJ.js → chunk-NPBJI7RE.js} +8 -8
  102. package/dist/cli/chunk-NTVLGHFM.js +501 -0
  103. package/dist/cli/{chunk-HQXL5526.mjs → chunk-NUX2QHNC.mjs} +1 -1
  104. package/dist/cli/{chunk-JGHG4NBA.js → chunk-OBB4QXHA.js} +19 -4
  105. package/dist/cli/{chunk-SEFMGO3Z.js → chunk-OQQOXSYA.js} +2184 -117
  106. package/dist/cli/chunk-OZ6E3IRZ.js +6084 -0
  107. package/dist/cli/{chunk-7P5AA3SN.js → chunk-PPDBRJRW.js} +6 -1
  108. package/dist/cli/{chunk-FHPCKULR.mjs → chunk-PZSLPBDA.mjs} +2 -2
  109. package/dist/cli/{chunk-ILHRA7AD.js → chunk-QADCFSGH.js} +7 -7
  110. package/dist/cli/{chunk-RTCDW2GU.js → chunk-QJI5FIOW.js} +170 -49
  111. package/dist/cli/{chunk-WYQO2CBS.mjs → chunk-QL22Y56M.mjs} +149 -28
  112. package/dist/cli/{chunk-2PRO2JTX.mjs → chunk-RFB25DSQ.mjs} +36 -284
  113. package/dist/cli/chunk-T44IIOT6.mjs +501 -0
  114. package/dist/cli/chunk-VK2LZ5IP.js +35 -0
  115. package/dist/cli/chunk-VKKVSFRD.js +62 -0
  116. package/dist/cli/{chunk-2GI3QD3L.js → chunk-VYKV5XHL.js} +644 -330
  117. package/dist/cli/{chunk-GSK6NHVM.js → chunk-WU4U6VSB.js} +5 -5
  118. package/dist/cli/chunk-XHLKJOTN.mjs +313 -0
  119. package/dist/cli/{chunk-IT3XBJQR.mjs → chunk-XIHWSXSV.mjs} +330 -625
  120. package/dist/cli/chunk-XNZJKRJA.mjs +6084 -0
  121. package/dist/cli/chunk-ZCALLYF6.mjs +62 -0
  122. package/dist/cli/{chunk-WHG43Z67.js → chunk-ZFZ427HN.js} +11 -8
  123. package/dist/cli/{chunk-J6DCKJNM.mjs → chunk-ZKYEW55U.mjs} +16 -1
  124. package/dist/cli/{csv-BBOTCGQY.js → csv-7U3FJYKZ.js} +14 -14
  125. package/dist/cli/{csv-A2MP6EFV.mjs → csv-ZWLDMM4A.mjs} +5 -5
  126. package/dist/cli/{db-G4CODDCA.js → db-DNCGV5PC.js} +42 -47
  127. package/dist/cli/{db-3W5DMTUX.mjs → db-IMYXVMGI.mjs} +15 -20
  128. package/dist/cli/{describe-XYJ2ZT4M.mjs → describe-Q23DWJUK.mjs} +20 -15
  129. package/dist/cli/{describe-PQTQ5B6F.js → describe-S34JUX5W.js} +27 -22
  130. package/dist/cli/describe-core.d.mts +2 -2
  131. package/dist/cli/describe-core.d.ts +2 -2
  132. package/dist/cli/describe-core.js +6 -6
  133. package/dist/cli/describe-core.mjs +5 -5
  134. package/dist/cli/{executions-UR67CA5H.mjs → executions-A73EUGSI.mjs} +8 -8
  135. package/dist/cli/{executions-TLANVR7Y.js → executions-XOMPX2YJ.js} +10 -10
  136. package/dist/cli/{feedback-WHCMGEIL.mjs → feedback-N4GJ2POI.mjs} +11 -7
  137. package/dist/cli/{feedback-6C2YTRJL.js → feedback-QTCHNJJH.js} +13 -9
  138. package/dist/cli/{git-GWLB6VSA.mjs → git-4Q3JIQYZ.mjs} +6 -6
  139. package/dist/cli/git-I6CPBEVG.js +24 -0
  140. package/dist/cli/index.js +236 -348
  141. package/dist/cli/index.mjs +162 -274
  142. package/dist/cli/{legacy-noops-KF4XIFEF.mjs → legacy-noops-3SOVGFF7.mjs} +6 -6
  143. package/dist/cli/{legacy-noops-ZUFA7RWI.js → legacy-noops-4OSHZM34.js} +9 -9
  144. package/dist/cli/{monitors-TB3K2IVE.js → monitors-LVE2KZNG.js} +94 -94
  145. package/dist/cli/{monitors-6UOIDIMB.mjs → monitors-QP2XID2B.mjs} +8 -8
  146. package/dist/cli/{org-WGHHMVDZ.mjs → org-IVRETVQA.mjs} +8 -8
  147. package/dist/cli/{org-CKWMBPIR.js → org-XFLK5IAP.js} +68 -68
  148. package/dist/cli/{play-LYPAXCLD.mjs → play-DE7VH6NU.mjs} +533 -98
  149. package/dist/cli/{play-N2B3KAVS.js → play-XXTPPP23.js} +1067 -632
  150. package/dist/cli/{providers-UR42MD6Z.js → providers-DLD3I4JF.js} +11 -11
  151. package/dist/cli/{providers-6DI5BVZJ.mjs → providers-GX2NIZQQ.mjs} +8 -8
  152. package/dist/cli/{quickstart-MNA2S6PO.mjs → quickstart-72B4L4PK.mjs} +5 -5
  153. package/dist/cli/{quickstart-FCJG4XGB.js → quickstart-XNS3HSWC.js} +7 -7
  154. package/dist/cli/search-6NCH4HB5.js +30 -0
  155. package/dist/cli/{search-VPPYUJ2M.mjs → search-SUTRANJI.mjs} +9 -9
  156. package/dist/cli/{secrets-QOSMVO36.js → secrets-6OBLOVEV.js} +17 -17
  157. package/dist/cli/{secrets-DRI4W7Z5.mjs → secrets-FPFXXNUH.mjs} +8 -8
  158. package/dist/cli/sessions-235532DR.js +16 -0
  159. package/dist/cli/{sessions-DQNUKP43.mjs → sessions-R25I4QKN.mjs} +6 -6
  160. package/dist/cli/{settings-DWDK3Y2R.mjs → settings-AOP6F5PZ.mjs} +12 -12
  161. package/dist/cli/{settings-JUGGCOPS.js → settings-VL5FOFPN.js} +79 -79
  162. package/dist/cli/{setup-AWBHNYXK.js → setup-BSC67YT3.js} +45 -44
  163. package/dist/cli/{setup-D5DWVNY4.mjs → setup-ZMPHBHVJ.mjs} +11 -10
  164. package/dist/cli/skills-3IWLYYRL.js +29 -0
  165. package/dist/cli/{skills-YV2XR35J.mjs → skills-KF65TVFO.mjs} +7 -7
  166. package/dist/cli/tools-LR66SPYU.js +44 -0
  167. package/dist/cli/{tools-VFJYHNV2.mjs → tools-SX4XIPM7.mjs} +19 -14
  168. package/dist/cli/{update-IM6VOTGL.mjs → update-QRMFRAQQ.mjs} +11 -9
  169. package/dist/cli/update-SP7UEO53.js +31 -0
  170. package/dist/cli/{workflow-26URBWPV.mjs → workflow-FOEEEB7G.mjs} +44 -20
  171. package/dist/cli/{workflow-3BS6U6SL.js → workflow-KOCK2FLW.js} +54 -30
  172. package/dist/{client-BfInrZPB.d.mts → client-74k4IPh6.d.mts} +135 -54
  173. package/dist/{client-BMjJFpan.d.ts → client-C1IK1f8c.d.ts} +135 -54
  174. package/dist/{compiler-manifest-Ycx-hoAr.d.mts → compiler-manifest-lzWpbV3w.d.mts} +83 -66
  175. package/dist/{compiler-manifest-Ycx-hoAr.d.ts → compiler-manifest-lzWpbV3w.d.ts} +83 -66
  176. package/dist/{index-CZXgiN3E.d.mts → index-C8Cy-YTm.d.ts} +5 -1
  177. package/dist/{index-NPG5pqxQ.d.ts → index-CtNK-0nI.d.mts} +5 -1
  178. package/dist/index.d.mts +47 -9
  179. package/dist/index.d.ts +47 -9
  180. package/dist/index.js +17 -14
  181. package/dist/index.mjs +13 -10
  182. package/dist/install-integrity.json +118 -102
  183. package/dist/plays/bundle-play-file.d.mts +3 -3
  184. package/dist/plays/bundle-play-file.d.ts +3 -3
  185. package/dist/plays/bundle-play-file.mjs +5 -4
  186. package/dist/plays/csv-data-input.js +3 -3
  187. package/dist/plays/csv-data-input.mjs +2 -2
  188. package/dist/plays/play-description.d.mts +2 -2
  189. package/dist/plays/play-description.d.ts +2 -2
  190. package/dist/plays/run-request.d.mts +2 -2
  191. package/dist/plays/run-request.d.ts +2 -2
  192. package/dist/plays/run-request.js +11 -3
  193. package/dist/plays/run-request.mjs +10 -2
  194. package/dist/release.d.mts +15 -6
  195. package/dist/release.d.ts +15 -6
  196. package/dist/release.js +2 -2
  197. package/dist/release.mjs +1 -1
  198. package/package.json +2 -2
  199. package/dist/cli/auth-F6BX32XZ.js +0 -40
  200. package/dist/cli/chunk-264PC2RN.mjs +0 -83
  201. package/dist/cli/chunk-44ZTYHMQ.mjs +0 -155
  202. package/dist/cli/chunk-53HN7WZN.js +0 -392
  203. package/dist/cli/chunk-7AALNGTA.mjs +0 -392
  204. package/dist/cli/chunk-ALD4COBH.js +0 -155
  205. package/dist/cli/chunk-CLJGSOVM.mjs +0 -1716
  206. package/dist/cli/chunk-WNUR6VP5.js +0 -83
  207. package/dist/cli/chunk-Z4VNJOF7.js +0 -1716
  208. package/dist/cli/git-VQFF6D7C.js +0 -24
  209. package/dist/cli/search-NCEEONMQ.js +0 -30
  210. package/dist/cli/sessions-3WYKQABW.js +0 -16
  211. package/dist/cli/skills-AKPAJVSO.js +0 -29
  212. package/dist/cli/tools-RBKEK6PM.js +0 -39
  213. package/dist/cli/update-VFNUBLDA.js +0 -29
package/dist/cli/index.js CHANGED
@@ -4,41 +4,42 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkRTCDW2GUjs = require('./chunk-RTCDW2GU.js');
8
- require('./chunk-GAICVLKL.js');
9
7
 
10
8
 
11
9
 
10
+ var _chunk5TUGWDEBjs = require('./chunk-5TUGWDEB.js');
11
+ require('./chunk-QJI5FIOW.js');
12
+ require('./chunk-D37FEBES.js');
13
+ require('./chunk-NTVLGHFM.js');
12
14
 
13
15
 
16
+ var _chunkVK2LZ5IPjs = require('./chunk-VK2LZ5IP.js');
14
17
 
15
18
 
16
19
 
17
20
 
18
21
 
19
22
 
23
+ var _chunkOBB4QXHAjs = require('./chunk-OBB4QXHA.js');
20
24
 
21
25
 
22
26
 
23
27
 
24
28
 
25
- var _chunkWLOCMJWVjs = require('./chunk-WLOCMJWV.js');
26
29
 
27
30
 
28
31
 
29
32
 
30
33
 
31
- var _chunkWNUR6VP5js = require('./chunk-WNUR6VP5.js');
32
34
 
33
35
 
34
36
 
35
- var _chunkJGHG4NBAjs = require('./chunk-JGHG4NBA.js');
36
37
 
37
38
 
38
- var _chunkALD4COBHjs = require('./chunk-ALD4COBH.js');
39
39
 
40
40
 
41
41
 
42
+ var _chunkLTFL4JRNjs = require('./chunk-LTFL4JRN.js');
42
43
 
43
44
 
44
45
 
@@ -48,23 +49,26 @@ var _chunkALD4COBHjs = require('./chunk-ALD4COBH.js');
48
49
 
49
50
 
50
51
 
51
- var _chunkYD7B53RWjs = require('./chunk-YD7B53RW.js');
52
52
 
53
53
 
54
54
 
55
+ var _chunkNF4V5DTYjs = require('./chunk-NF4V5DTY.js');
55
56
 
56
57
 
57
58
 
58
59
 
59
60
 
60
61
 
61
- var _chunkFJCIUF34js = require('./chunk-FJCIUF34.js');
62
62
 
63
63
 
64
- var _chunkQ2E4E4FJjs = require('./chunk-Q2E4E4FJ.js');
64
+
65
+ var _chunkFVLNYDI4js = require('./chunk-FVLNYDI4.js');
66
+
67
+
68
+ var _chunkNPBJI7REjs = require('./chunk-NPBJI7RE.js');
65
69
  require('./chunk-XNYIZMNQ.js');
66
- require('./chunk-7P5AA3SN.js');
67
- require('./chunk-DEC3JECC.js');
70
+ require('./chunk-PPDBRJRW.js');
71
+ require('./chunk-5UUQAGJS.js');
68
72
  require('./chunk-OG64RBAC.js');
69
73
 
70
74
 
@@ -134,48 +138,48 @@ var _os = require('os');
134
138
  var COMMAND_GROUPS = [
135
139
  {
136
140
  names: ["auth"],
137
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-F6BX32XZ.js")))).registerAuthCommands
141
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-UG4WOYGL.js")))).registerAuthCommands
138
142
  },
139
143
  {
140
144
  names: ["providers"],
141
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./providers-UR42MD6Z.js")))).registerProviderCommands
145
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./providers-DLD3I4JF.js")))).registerProviderCommands
142
146
  },
143
147
  {
144
148
  names: ["search"],
145
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./search-NCEEONMQ.js")))).registerSearchCommand
149
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./search-6NCH4HB5.js")))).registerSearchCommand
146
150
  },
147
151
  {
148
152
  names: ["describe"],
149
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-PQTQ5B6F.js")))).registerDescribeCommand
153
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-S34JUX5W.js")))).registerDescribeCommand
150
154
  },
151
155
  {
152
156
  names: ["tools"],
153
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-RBKEK6PM.js")))).registerToolsCommands
157
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-LR66SPYU.js")))).registerToolsCommands
154
158
  },
155
159
  {
156
160
  names: ["executions"],
157
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./executions-TLANVR7Y.js")))).registerExecutionsCommands
161
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./executions-XOMPX2YJ.js")))).registerExecutionsCommands
158
162
  },
159
163
  {
160
164
  names: ["plays", "runs"],
161
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./play-N2B3KAVS.js")))).registerPlayCommands
165
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./play-XXTPPP23.js")))).registerPlayCommands
162
166
  },
163
167
  {
164
168
  names: ["sessions"],
165
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-3WYKQABW.js")))).registerSessionsCommands
169
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./sessions-235532DR.js")))).registerSessionsCommands
166
170
  },
167
171
  {
168
172
  names: ["workflows"],
169
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-3BS6U6SL.js")))).registerWorkflowCommands
173
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-KOCK2FLW.js")))).registerWorkflowCommands
170
174
  },
171
175
  {
172
176
  names: ["secrets"],
173
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./secrets-QOSMVO36.js")))).registerSecretsCommands
177
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./secrets-6OBLOVEV.js")))).registerSecretsCommands
174
178
  },
175
179
  {
176
180
  names: ["settings", "notifications"],
177
181
  load: async () => {
178
- const commands = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-JUGGCOPS.js")));
182
+ const commands = await Promise.resolve().then(() => _interopRequireWildcard(require("./settings-VL5FOFPN.js")));
179
183
  return (p) => {
180
184
  commands.registerSettingsCommands(p);
181
185
  commands.registerNotificationCommands(p);
@@ -184,51 +188,51 @@ var COMMAND_GROUPS = [
184
188
  },
185
189
  {
186
190
  names: ["billing"],
187
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./billing-4275N7FL.js")))).registerBillingCommands
191
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./billing-NFPK7GYP.js")))).registerBillingCommands
188
192
  },
189
193
  {
190
194
  names: ["monitors"],
191
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./monitors-TB3K2IVE.js")))).registerMonitorsCommands
195
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./monitors-LVE2KZNG.js")))).registerMonitorsCommands
192
196
  },
193
197
  {
194
198
  names: ["org"],
195
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./org-CKWMBPIR.js")))).registerOrgCommands
199
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./org-XFLK5IAP.js")))).registerOrgCommands
196
200
  },
197
201
  {
198
202
  names: ["git", "projects", "deployments"],
199
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./git-VQFF6D7C.js")))).registerGitCommands
203
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./git-I6CPBEVG.js")))).registerGitCommands
200
204
  },
201
205
  {
202
206
  names: ["csv"],
203
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./csv-BBOTCGQY.js")))).registerCsvCommands
207
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./csv-7U3FJYKZ.js")))).registerCsvCommands
204
208
  },
205
209
  {
206
210
  names: ["db"],
207
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./db-G4CODDCA.js")))).registerDbCommands
211
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./db-DNCGV5PC.js")))).registerDbCommands
208
212
  },
209
213
  {
210
214
  names: ["feedback"],
211
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-6C2YTRJL.js")))).registerFeedbackCommands
215
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./feedback-QTCHNJJH.js")))).registerFeedbackCommands
212
216
  },
213
217
  {
214
218
  names: ["enrich", "session", "backend"],
215
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./legacy-noops-ZUFA7RWI.js")))).registerDeprecatedCommands
219
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./legacy-noops-4OSHZM34.js")))).registerDeprecatedCommands
216
220
  },
217
221
  {
218
222
  names: ["update"],
219
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./update-VFNUBLDA.js")))).registerUpdateCommand
223
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./update-SP7UEO53.js")))).registerUpdateCommand
220
224
  },
221
225
  {
222
226
  names: ["skills", "skills-auto-sync"],
223
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-AKPAJVSO.js")))).registerSkillsCommand
227
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./skills-3IWLYYRL.js")))).registerSkillsCommand
224
228
  },
225
229
  {
226
230
  names: ["setup", "doctor"],
227
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./setup-AWBHNYXK.js")))).registerSetupCommands
231
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./setup-BSC67YT3.js")))).registerSetupCommands
228
232
  },
229
233
  {
230
234
  names: ["quickstart"],
231
- load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./quickstart-FCJG4XGB.js")))).registerQuickstartCommands
235
+ load: async () => (await Promise.resolve().then(() => _interopRequireWildcard(require("./quickstart-XNS3HSWC.js")))).registerQuickstartCommands
232
236
  }
233
237
  ];
234
238
  async function registerDeeplineCommandGroups(program, requestedCommand) {
@@ -250,6 +254,51 @@ function registerDeeplineInlineCommands(program) {
250
254
  return { preflight, health, version };
251
255
  }
252
256
 
257
+ // src/cli/deferred-play-maintenance.ts
258
+ function createDeferredPlayRunMaintenance(input) {
259
+ return async () => {
260
+ try {
261
+ const skillsVersion = _chunkFVLNYDI4js.readSdkSkillsLocalVersion.call(void 0, input.baseUrl);
262
+ const compatibility = await _chunkOBB4QXHAjs.traceCliSpan.call(void 0,
263
+ "cli.sdk_compatibility_deferred",
264
+ {
265
+ baseUrl: input.baseUrl,
266
+ command: "plays run",
267
+ skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
268
+ },
269
+ () => _chunkLTFL4JRNjs.checkSdkCompatibility.call(void 0, input.baseUrl, {
270
+ command: "plays run",
271
+ skillsVersion,
272
+ persistCache: input.policy !== "off",
273
+ catalog: _chunk5TUGWDEBjs.compatibilityCatalog.call(void 0, input.command)
274
+ })
275
+ );
276
+ if (compatibility.error || !compatibility.response) return;
277
+ const automaticUpdate = compatibility.response.auto_update;
278
+ if (_optionalChain([automaticUpdate, 'optionalAccess', _4 => _4.should_auto_update]) && !automaticUpdate.required && automaticUpdate.reason !== "rollback_forced") {
279
+ await _chunk5TUGWDEBjs.maybeAutoUpdateAndRelaunch.call(void 0,
280
+ compatibility.response,
281
+ input.baseUrl,
282
+ input.policy
283
+ );
284
+ }
285
+ const skillsUpdate = Object.prototype.hasOwnProperty.call(
286
+ compatibility.response,
287
+ "skills"
288
+ ) ? _nullishCoalesce(compatibility.response.skills, () => ( null)) : void 0;
289
+ await _chunkLTFL4JRNjs.syncSdkSkillsIfNeeded.call(void 0, input.baseUrl, {
290
+ update: skillsUpdate,
291
+ mode: "detached"
292
+ });
293
+ } catch (error) {
294
+ process.stderr.write(
295
+ `Deepline CLI maintenance check failed: ${error instanceof Error ? error.message : String(error)}
296
+ `
297
+ );
298
+ }
299
+ };
300
+ }
301
+
253
302
  // src/cli/help-seen.ts
254
303
 
255
304
 
@@ -265,7 +314,7 @@ var MAX_SESSIONS = 20;
265
314
  function helpSeenPath(homeDir = _os.homedir.call(void 0, )) {
266
315
  return _path.join.call(void 0, homeDir, ".local", "deepline", "sdk-cli", "help-seen.json");
267
316
  }
268
- function resolveHelpDetail(argv, key, homeDir = _os.homedir.call(void 0, ), sessionId = _chunkFJCIUF34js.agentSessionIdFromEnvironment.call(void 0, )) {
317
+ function resolveHelpDetail(argv, key, homeDir = _os.homedir.call(void 0, ), sessionId = _chunkFVLNYDI4js.agentSessionIdFromEnvironment.call(void 0, )) {
269
318
  const explicit = _chunk5MLCBXXUjs.helpDetailFromArgv.call(void 0, argv);
270
319
  if (explicit === "quiet") return { detail: "quiet", firstRead: false };
271
320
  if (!sessionId) return { detail: explicit, firstRead: false };
@@ -331,221 +380,6 @@ function writeSessions(path, sessions) {
331
380
  }
332
381
  }
333
382
 
334
- // src/cli/self-update.ts
335
- var _child_process = require('child_process');
336
- var AUTO_UPDATE_TELEMETRY_TIMEOUT_MS = 2e3;
337
- var TRUSTED_AUTO_UPDATE_ORIGIN = "https://code.deepline.com";
338
- function trustedAutoUpdateRegistryUrl(baseUrl) {
339
- try {
340
- const url = new URL(baseUrl);
341
- if (url.origin !== TRUSTED_AUTO_UPDATE_ORIGIN) return null;
342
- return new URL("/api/v2/npm/", url.origin).toString();
343
- } catch (e) {
344
- return null;
345
- }
346
- }
347
- async function reportAutoUpdateEvent(input) {
348
- let apiKey = "";
349
- try {
350
- apiKey = _chunkFJCIUF34js.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
351
- } catch (e2) {
352
- return;
353
- }
354
- if (!apiKey) return;
355
- const controller = new AbortController();
356
- const timeout = setTimeout(
357
- () => controller.abort(),
358
- AUTO_UPDATE_TELEMETRY_TIMEOUT_MS
359
- );
360
- try {
361
- await fetch(new URL("/api/v2/telemetry/auto-update", input.baseUrl), {
362
- method: "POST",
363
- headers: {
364
- Authorization: `Bearer ${apiKey}`,
365
- "Content-Type": "application/json",
366
- "User-Agent": `deepline-ts-sdk/${_chunkFJCIUF34js.SDK_VERSION}`,
367
- "X-Deepline-Client-Family": "sdk",
368
- "X-Deepline-CLI-Family": "sdk",
369
- "X-Deepline-CLI-Version": _chunkFJCIUF34js.SDK_VERSION,
370
- "X-Deepline-SDK-Version": _chunkFJCIUF34js.SDK_VERSION
371
- },
372
- body: JSON.stringify({
373
- event: input.event,
374
- current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkFJCIUF34js.SDK_VERSION,
375
- target_version: input.response.latest,
376
- reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
377
- command: _nullishCoalesce(input.response.command, () => ( null)),
378
- install_kind: input.installKind,
379
- ...input.exitCode === void 0 ? {} : { exit_code: input.exitCode }
380
- }),
381
- signal: controller.signal
382
- });
383
- } catch (e3) {
384
- } finally {
385
- clearTimeout(timeout);
386
- }
387
- }
388
- function envTruthy(name) {
389
- const value = _optionalChain([process, 'access', _11 => _11.env, 'access', _12 => _12[name], 'optionalAccess', _13 => _13.trim, 'call', _14 => _14(), 'access', _15 => _15.toLowerCase, 'call', _16 => _16()]);
390
- return value === "1" || value === "true" || value === "yes";
391
- }
392
- function shouldSkipSelfUpdate(policy) {
393
- return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkRTCDW2GUjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkWLOCMJWVjs.isCiEnvironment.call(void 0, );
394
- }
395
- function parseSemver(version) {
396
- const trimmed = _optionalChain([version, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]);
397
- if (!trimmed) return null;
398
- const match = /^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/.exec(trimmed);
399
- if (!match) return null;
400
- return {
401
- major: Number(match[1]),
402
- minor: Number(match[2]),
403
- patch: Number(match[3]),
404
- prerelease: _nullishCoalesce(match[4], () => ( ""))
405
- };
406
- }
407
- function compareSemver(left, right) {
408
- const a = parseSemver(left);
409
- const b = parseSemver(right);
410
- if (!a || !b) {
411
- return left.localeCompare(right);
412
- }
413
- for (const key of ["major", "minor", "patch"]) {
414
- if (a[key] !== b[key]) return a[key] > b[key] ? 1 : -1;
415
- }
416
- if (a.prerelease === b.prerelease) return 0;
417
- if (!a.prerelease) return 1;
418
- if (!b.prerelease) return -1;
419
- return a.prerelease.localeCompare(b.prerelease);
420
- }
421
- function isDowngradeAutoUpdateResponse(response) {
422
- const target = _optionalChain([response, 'optionalAccess', _19 => _19.latest, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()]);
423
- const current = _optionalChain([response, 'optionalAccess', _22 => _22.current, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunkFJCIUF34js.SDK_VERSION;
424
- if (!target) return false;
425
- return compareSemver(target, current) < 0;
426
- }
427
- function relaunchCurrentCommand(plan, runtime = {}) {
428
- return new Promise((resolve) => {
429
- const command = plan.kind === "python-sidecar" ? plan.sidecarPath : _nullishCoalesce(runtime.execPath, () => ( process.execPath));
430
- const argv = _nullishCoalesce(runtime.argv, () => ( process.argv));
431
- const args = plan.kind === "python-sidecar" ? argv.slice(2) : argv.slice(1);
432
- const platform = _nullishCoalesce(runtime.platform, () => ( process.platform));
433
- const child = _child_process.spawn.call(void 0, command, args, {
434
- stdio: "inherit",
435
- // The Node executable is a native binary and must be spawned directly;
436
- // passing `C:\Program Files\...\node.exe` through cmd.exe splits it
437
- // at the first space. The Python-sidecar launcher is a `.cmd` file on
438
- // Windows and still needs the shell dispatch it has always used.
439
- shell: plan.kind === "python-sidecar" && platform === "win32",
440
- env: {
441
- ...process.env,
442
- DEEPLINE_NO_AUTO_UPDATE: "1"
443
- }
444
- });
445
- child.on("error", (error) => {
446
- process.stderr.write(
447
- `Deepline SDK/CLI updated, but relaunch failed: ${error.message}
448
- `
449
- );
450
- resolve(1);
451
- });
452
- child.on("close", (code) => resolve(_nullishCoalesce(code, () => ( 1))));
453
- });
454
- }
455
- async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configured") {
456
- const autoUpdate = _optionalChain([response, 'optionalAccess', _25 => _25.auto_update]);
457
- if (!response || !_optionalChain([autoUpdate, 'optionalAccess', _26 => _26.should_auto_update]) || shouldSkipSelfUpdate(policy)) {
458
- return false;
459
- }
460
- if (isDowngradeAutoUpdateResponse(response)) {
461
- const target = response.latest;
462
- const current = _optionalChain([response, 'access', _27 => _27.current, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()]) || _chunkFJCIUF34js.SDK_VERSION;
463
- process.stderr.write(
464
- `Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
465
- `
466
- );
467
- return false;
468
- }
469
- const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
470
- const plan = _chunkRTCDW2GUjs.resolveUpdatePlan.call(void 0, {
471
- packageSpec,
472
- requireVerifiedNpmOwnership: true,
473
- npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
474
- });
475
- if (!_chunkRTCDW2GUjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
476
- return false;
477
- }
478
- const label = autoUpdate.reason === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : autoUpdate.reason === "deprecated" ? "is deprecated and will update automatically" : autoUpdate.required ? "requires an update" : "has an update available and will update automatically";
479
- process.stderr.write(
480
- `Deepline SDK/CLI ${label}; running ${plan.manualCommand}
481
- `
482
- );
483
- void reportAutoUpdateEvent({
484
- baseUrl,
485
- response,
486
- event: "started",
487
- installKind: plan.kind
488
- });
489
- const updateResult = await _chunkRTCDW2GUjs.runAutomaticUpdatePlan.call(void 0, plan);
490
- if (updateResult.status === "skipped_previous_failure") {
491
- void reportAutoUpdateEvent({
492
- baseUrl,
493
- response,
494
- event: "skipped_previous_failure",
495
- installKind: plan.kind,
496
- exitCode: updateResult.exitCode
497
- });
498
- return false;
499
- }
500
- if (updateResult.exitCode !== 0) {
501
- void reportAutoUpdateEvent({
502
- baseUrl,
503
- response,
504
- event: "failed",
505
- installKind: plan.kind,
506
- exitCode: updateResult.exitCode
507
- });
508
- if (autoUpdate.required) {
509
- throw new Error(
510
- `Automatic Deepline SDK/CLI update failed with exit code ${updateResult.exitCode}. ${response.message}`
511
- );
512
- }
513
- process.stderr.write(
514
- `Deepline SDK/CLI auto-update failed with exit code ${updateResult.exitCode}; continuing with ${_nullishCoalesce(response.current, () => ( "current version"))}.
515
- `
516
- );
517
- return false;
518
- }
519
- void reportAutoUpdateEvent({
520
- baseUrl,
521
- response,
522
- event: "succeeded",
523
- installKind: plan.kind,
524
- exitCode: 0
525
- });
526
- const updateSummary = response.update_summary ? `
527
- What changed in ${response.update_summary.version}: ${response.update_summary.summary}` : "";
528
- process.stderr.write(
529
- `Deepline SDK/CLI updated; rerunning command.${updateSummary}
530
- `
531
- );
532
- const exitCode = await relaunchCurrentCommand(plan);
533
- process.exit(exitCode);
534
- return true;
535
- }
536
-
537
- // src/cli/maintenance-policy.ts
538
-
539
- function parseCliMaintenancePolicy(value) {
540
- if (value === "configured" || value === "off") return value;
541
- throw new (0, _commander.InvalidArgumentError)(
542
- "Maintenance policy must be configured or off."
543
- );
544
- }
545
- function resolveCliMaintenancePolicy(input) {
546
- return input.dryRun ? "off" : _nullishCoalesce(input.maintenance, () => ( "configured"));
547
- }
548
-
549
383
  // src/cli/output-size-reporting.ts
550
384
  var REPORT_MIN_LINES = 40;
551
385
  var REPORT_TIMEOUT_MS = 1e3;
@@ -577,8 +411,8 @@ function shouldReport(stdout, stderr) {
577
411
  return stdout.epipe || stderr.epipe || stdout.lines + stderr.lines > REPORT_MIN_LINES;
578
412
  }
579
413
  function toolName(action) {
580
- const [toolId] = _optionalChain([action, 'optionalAccess', _30 => _30.path]) === "tools execute" ? action.args : [];
581
- return typeof toolId === "string" ? _chunkWLOCMJWVjs.redactFailureText.call(void 0, toolId) : null;
414
+ const [toolId] = _optionalChain([action, 'optionalAccess', _5 => _5.path]) === "tools execute" ? action.args : [];
415
+ return typeof toolId === "string" ? _chunkLTFL4JRNjs.redactFailureText.call(void 0, toolId) : null;
582
416
  }
583
417
  function chunkText(chunk) {
584
418
  if (typeof chunk === "string") return chunk;
@@ -609,20 +443,20 @@ function watch(stream) {
609
443
  }
610
444
  async function postCommandOutput(body) {
611
445
  try {
612
- const baseUrl = _chunkFJCIUF34js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
613
- const apiKey = _chunkFJCIUF34js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
446
+ const baseUrl = _chunkFVLNYDI4js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
447
+ const apiKey = _chunkFVLNYDI4js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
614
448
  if (!apiKey) return;
615
- const agentSessionId = _chunkFJCIUF34js.agentSessionIdFromEnvironment.call(void 0, );
449
+ const agentSessionId = _chunkFVLNYDI4js.agentSessionIdFromEnvironment.call(void 0, );
616
450
  await fetch(new URL("/api/v2/telemetry/command-output", baseUrl), {
617
451
  method: "POST",
618
452
  headers: {
619
- ..._chunkWLOCMJWVjs.failureReportHeaders.call(void 0, apiKey),
453
+ ..._chunkLTFL4JRNjs.failureReportHeaders.call(void 0, apiKey),
620
454
  ...agentSessionId ? { "X-Deepline-Agent-Session-Id": agentSessionId } : {}
621
455
  },
622
456
  body: JSON.stringify(body),
623
457
  signal: AbortSignal.timeout(REPORT_TIMEOUT_MS)
624
458
  });
625
- } catch (e4) {
459
+ } catch (e) {
626
460
  }
627
461
  }
628
462
  function startOutputSizeReporting(invocation, streams = {
@@ -632,14 +466,14 @@ function startOutputSizeReporting(invocation, streams = {
632
466
  const stdoutWatch = watch(streams.stdout);
633
467
  const stderrWatch = watch(streams.stderr);
634
468
  return async (finished) => {
635
- if (_chunkWLOCMJWVjs.isFailureReportingDisabled.call(void 0, )) return;
469
+ if (_chunkLTFL4JRNjs.isFailureReportingDisabled.call(void 0, )) return;
636
470
  const [stdout, stderr] = await Promise.all([
637
471
  stdoutWatch.settled(),
638
472
  stderrWatch.settled()
639
473
  ]);
640
474
  if (!shouldReport(stdout, stderr)) return;
641
475
  await postCommandOutput({
642
- command: _chunkWLOCMJWVjs.sanitizeCommand.call(void 0, invocation.argv),
476
+ command: _chunkLTFL4JRNjs.sanitizeCommand.call(void 0, invocation.argv),
643
477
  tool: toolName(finished.action),
644
478
  exit_code: typeof finished.exitCode === "number" ? finished.exitCode : null,
645
479
  duration_ms: Math.max(0, Date.now() - invocation.startedAtMs),
@@ -668,9 +502,9 @@ function silenceCommanderErrorOutput(command) {
668
502
  for (const child of command.commands) silenceCommanderErrorOutput(child);
669
503
  }
670
504
  function printUsageErrorJson(code, message, commandPath) {
671
- const unknownName = code === "commander.unknownCommand" ? _optionalChain([/unknown command '([^']+)'/, 'access', _31 => _31.exec, 'call', _32 => _32(message), 'optionalAccess', _33 => _33[1]]) : void 0;
505
+ const unknownName = code === "commander.unknownCommand" ? _optionalChain([/unknown command '([^']+)'/, 'access', _6 => _6.exec, 'call', _7 => _7(message), 'optionalAccess', _8 => _8[1]]) : void 0;
672
506
  const helpPath = unknownName && commandPath.endsWith(` ${unknownName}`) ? commandPath.slice(0, -unknownName.length - 1) : commandPath;
673
- _chunkYD7B53RWjs.printJson.call(void 0, {
507
+ _chunkNF4V5DTYjs.printJson.call(void 0, {
674
508
  ok: false,
675
509
  error: {
676
510
  code,
@@ -715,7 +549,7 @@ function isAutoUpdateSettingsInvocation() {
715
549
  function compatibilityCommandPath(command) {
716
550
  const names = [];
717
551
  let current = command;
718
- while (_optionalChain([current, 'optionalAccess', _34 => _34.parent])) {
552
+ while (_optionalChain([current, 'optionalAccess', _9 => _9.parent])) {
719
553
  const name = current.name();
720
554
  if (name) names.unshift(name);
721
555
  current = current.parent;
@@ -732,7 +566,7 @@ function topLevelCommandKnown(program, commandName) {
732
566
  );
733
567
  }
734
568
  async function runPlayRunnerHealthCheck() {
735
- _chunkFJCIUF34js.resolveConfig.call(void 0, );
569
+ _chunkFVLNYDI4js.resolveConfig.call(void 0, );
736
570
  const dir = await _promises.mkdtemp.call(void 0, _path.join.call(void 0, _os.tmpdir.call(void 0, ), "deepline-health-play-"));
737
571
  const file = _path.join.call(void 0, dir, "health-check.play.ts");
738
572
  try {
@@ -762,7 +596,7 @@ async function runPlayRunnerHealthCheck() {
762
596
  });
763
597
  let exitCode = 1;
764
598
  try {
765
- const { handlePlayRun } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-N2B3KAVS.js")));
599
+ const { handlePlayRun } = await Promise.resolve().then(() => _interopRequireWildcard(require("./play-XXTPPP23.js")));
766
600
  exitCode = await handlePlayRun([
767
601
  file,
768
602
  "--input",
@@ -802,7 +636,7 @@ function preflightErrorMessage(error) {
802
636
  return error instanceof Error ? error.message : String(error);
803
637
  }
804
638
  async function runPreflightCheck() {
805
- const baseUrl = _chunkFJCIUF34js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
639
+ const baseUrl = _chunkFVLNYDI4js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
806
640
  const healthController = new AbortController();
807
641
  const healthTimeout = setTimeout(
808
642
  () => healthController.abort(),
@@ -817,9 +651,9 @@ async function runPreflightCheck() {
817
651
  version: pickString(payload, "version")
818
652
  };
819
653
  }).catch(() => ({ status: "unreachable", version: null })).finally(() => clearTimeout(healthTimeout));
820
- const apiKey = _chunkFJCIUF34js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
821
- const http = apiKey ? new (0, _chunkFJCIUF34js.HttpClient)(
822
- _chunkFJCIUF34js.resolveConfig.call(void 0, {
654
+ const apiKey = _chunkFVLNYDI4js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
655
+ const http = apiKey ? new (0, _chunkFVLNYDI4js.HttpClient)(
656
+ _chunkFVLNYDI4js.resolveConfig.call(void 0, {
823
657
  baseUrl,
824
658
  apiKey,
825
659
  timeout: PREFLIGHT_TIMEOUT_MS,
@@ -864,7 +698,7 @@ async function runPreflightCheck() {
864
698
  const connected = authStatus === "connected" || authStatus === "claimed";
865
699
  return {
866
700
  status: healthResult.status === "ok" && connected ? "ok" : "check",
867
- cli_version: _chunkFJCIUF34js.SDK_VERSION,
701
+ cli_version: _chunkFVLNYDI4js.SDK_VERSION,
868
702
  host: baseUrl,
869
703
  health: {
870
704
  status: healthResult.status,
@@ -890,7 +724,7 @@ async function runPreflightCheck() {
890
724
  {
891
725
  title: "preflight",
892
726
  lines: [
893
- `cli: ${_chunkFJCIUF34js.SDK_VERSION}`,
727
+ `cli: ${_chunkFVLNYDI4js.SDK_VERSION}`,
894
728
  `host: ${baseUrl}`,
895
729
  `health: ${healthResult.status}`,
896
730
  `auth: ${authStatus}`,
@@ -904,8 +738,8 @@ async function runPreflightCheck() {
904
738
  }
905
739
  function printPreflightHuman(data) {
906
740
  const render = data.render;
907
- const lines = _optionalChain([render, 'optionalAccess', _35 => _35.sections, 'optionalAccess', _36 => _36.flatMap, 'call', _37 => _37((section) => _nullishCoalesce(section.lines, () => ( [])))]);
908
- if (_optionalChain([lines, 'optionalAccess', _38 => _38.length])) {
741
+ const lines = _optionalChain([render, 'optionalAccess', _10 => _10.sections, 'optionalAccess', _11 => _11.flatMap, 'call', _12 => _12((section) => _nullishCoalesce(section.lines, () => ( [])))]);
742
+ if (_optionalChain([lines, 'optionalAccess', _13 => _13.length])) {
909
743
  process.stdout.write(`${lines.join("\n")}
910
744
  `);
911
745
  return;
@@ -915,12 +749,12 @@ function printPreflightHuman(data) {
915
749
  }
916
750
  async function newerCliCommandHint(baseUrl, command) {
917
751
  if (!command.trim()) return null;
918
- const { response, error } = await _chunkWLOCMJWVjs.checkSdkCompatibility.call(void 0, baseUrl, { command });
752
+ const { response, error } = await _chunkLTFL4JRNjs.checkSdkCompatibility.call(void 0, baseUrl, { command });
919
753
  if (error || !response) return null;
920
754
  const introduced = response.command_introduced_in;
921
755
  if (introduced) {
922
756
  return [
923
- `\`deepline ${introduced.command}\` was added in SDK CLI ${introduced.introduced_in}. This CLI is ${_chunkFJCIUF34js.SDK_VERSION}.`,
757
+ `\`deepline ${introduced.command}\` was added in SDK CLI ${introduced.introduced_in}. This CLI is ${_chunkFVLNYDI4js.SDK_VERSION}.`,
924
758
  ` ${introduced.reason}`,
925
759
  ` Update with: ${response.update_command}`,
926
760
  " Agent skills are served by Deepline and refresh on their own, so a skill can describe a command this CLI does not have yet."
@@ -929,30 +763,31 @@ async function newerCliCommandHint(baseUrl, command) {
929
763
  if (!response.update_required) return null;
930
764
  return [
931
765
  response.message,
932
- ` Installed: ${_chunkFJCIUF34js.SDK_VERSION}. Run: ${response.update_command}`,
766
+ ` Installed: ${_chunkFVLNYDI4js.SDK_VERSION}. Run: ${response.update_command}`,
933
767
  " If an agent skill told you to run this, the skill is newer than this CLI."
934
768
  ].join("\n");
935
769
  }
936
770
  async function runMain(ensureTransport, onAction) {
937
771
  const mainStartedAt = Date.now();
938
- _chunkYD7B53RWjs.installJsonStderrGuard.call(void 0, );
772
+ _chunkNF4V5DTYjs.installJsonStderrGuard.call(void 0, );
939
773
  let rootHelpStatus = "";
940
- _chunkJGHG4NBAjs.recordCliTrace.call(void 0, {
774
+ const deferredMaintenance = { inlinePlay: null };
775
+ _chunkOBB4QXHAjs.recordCliTrace.call(void 0, {
941
776
  phase: "cli.main_start",
942
777
  argv: process.argv.slice(2)
943
778
  });
944
779
  const printStartupPhase = shouldPrintStartupPhase();
945
- const progress = printStartupPhase ? _chunkALD4COBHjs.createCliProgress.call(void 0, true) : null;
780
+ const progress = printStartupPhase ? _chunkLTFL4JRNjs.createCliProgress.call(void 0, true) : null;
946
781
  if (printStartupPhase) {
947
- _optionalChain([progress, 'optionalAccess', _39 => _39.phase, 'call', _40 => _40("loading deepline cli")]);
782
+ _optionalChain([progress, 'optionalAccess', _14 => _14.phase, 'call', _15 => _15("loading deepline cli")]);
948
783
  }
949
784
  const program = new (0, _commander.Command)();
950
785
  program.name("deepline").description(
951
786
  "Deepline CLI \u2014 GTM enrichment tools, plays, and runs from your terminal."
952
- ).version(_chunkFJCIUF34js.SDK_VERSION, "-v, --version", "Show version").option(
787
+ ).version(_chunkFVLNYDI4js.SDK_VERSION, "-v, --version", "Show version").option(
953
788
  "--maintenance <policy>",
954
789
  "Installation maintenance: configured preferences or off; independent of output format",
955
- parseCliMaintenancePolicy,
790
+ _chunkOBB4QXHAjs.parseCliMaintenancePolicy,
956
791
  "configured"
957
792
  ).exitOverride().showHelpAfterError().showSuggestionAfterError(true).addHelpText(
958
793
  "beforeAll",
@@ -988,6 +823,13 @@ Safety:
988
823
  --maintenance configured permits CLI updates according to settings and installed skill synchronization.
989
824
  --maintenance off suppresses both and compatibility cache writes. --dry-run implies off.
990
825
  Maintenance policy is the same for terminal, --json, and piped output. Compatibility checks still run.
826
+ An optional CLI update installs after the command finishes and applies to the next command;
827
+ only an update the server requires installs first and reruns the command.
828
+
829
+ Environment:
830
+ DEEPLINE_SKIP_SELF_UPDATE=1 Skip automatic CLI updates for this invocation.
831
+ DEEPLINE_SKIP_SKILLS_SYNC=1 Skip automatic agent-skill sync for this invocation.
832
+ Each is independent; --maintenance off does both. To persist: deepline settings autoupdate off.
991
833
 
992
834
  Exit codes:
993
835
  0 success; 2 usage/local input error; 3 auth/permission error; 4 not found;
@@ -1003,41 +845,64 @@ Exit codes:
1003
845
  path: compatibilityCommandPath(actionCommand),
1004
846
  args: actionCommand.processedArgs
1005
847
  });
1006
- const maintenance = resolveCliMaintenancePolicy(
848
+ const maintenance = _chunkOBB4QXHAjs.resolveCliMaintenancePolicy.call(void 0,
1007
849
  actionCommand.optsWithGlobals()
1008
850
  );
1009
851
  if (actionCommand.name() !== "version") {
1010
852
  await ensureTransport();
1011
853
  }
1012
- if (actionCommand.name() === "version" || actionCommand.name() === "update" || actionCommand.name() === "setup" || actionCommand.name() === "skills" || actionCommand.name() === _chunkWLOCMJWVjs.SKILLS_AUTO_SYNC_COMMAND || actionCommand.name() === "doctor" || isAutoUpdateSettingsInvocation() || isDeprecatedCommandInvocation()) {
854
+ if (actionCommand.name() === "version" || actionCommand.name() === "update" || actionCommand.name() === "setup" || actionCommand.name() === "skills" || actionCommand.name() === _chunkLTFL4JRNjs.SKILLS_AUTO_SYNC_COMMAND || actionCommand.name() === "doctor" || isAutoUpdateSettingsInvocation() || isDeprecatedCommandInvocation()) {
1013
855
  return;
1014
856
  }
1015
857
  const compatibilityCommand = compatibilityCommandPath(actionCommand) || actionCommand.name();
1016
858
  const isToolExecuteCommand = compatibilityCommand === "tools execute";
1017
859
  if (isToolExecuteCommand) {
1018
- _chunkWNUR6VP5js.beginToolExecuteCommand.call(void 0, );
860
+ _chunk5TUGWDEBjs.beginToolExecuteCommand.call(void 0, );
861
+ }
862
+ if (isToolExecuteCommand) {
863
+ const baseUrl = _chunkFVLNYDI4js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
864
+ if (maintenance !== "off") _chunkLTFL4JRNjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
865
+ _chunkOBB4QXHAjs.recordCliTrace.call(void 0, {
866
+ phase: "cli.sdk_compatibility_deferred_to_tool_execute",
867
+ baseUrl,
868
+ command: compatibilityCommand
869
+ });
870
+ return;
1019
871
  }
1020
- const runStartupStage = (stage, action) => isToolExecuteCommand ? _chunkWNUR6VP5js.runToolExecuteStage.call(void 0, stage, action) : Promise.resolve(action());
872
+ const playDryRun = compatibilityCommand === "plays run" && actionCommand.optsWithGlobals().dryRun === true;
873
+ if (!playDryRun && _chunkVK2LZ5IPjs.usesInlinePlayAdmission.call(void 0, compatibilityCommand, process.argv.slice(2))) {
874
+ if (maintenance !== "off") {
875
+ const baseUrl = _chunkFVLNYDI4js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
876
+ _chunkLTFL4JRNjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
877
+ deferredMaintenance.inlinePlay = createDeferredPlayRunMaintenance({
878
+ baseUrl,
879
+ command: actionCommand,
880
+ policy: maintenance
881
+ });
882
+ }
883
+ return;
884
+ }
885
+ const runStartupStage = (stage, action) => isToolExecuteCommand ? _chunk5TUGWDEBjs.runToolExecuteStage.call(void 0, stage, action) : Promise.resolve(action());
1021
886
  if (printStartupPhase) {
1022
- _optionalChain([progress, 'optionalAccess', _41 => _41.phase, 'call', _42 => _42("checking sdk compatibility")]);
887
+ _optionalChain([progress, 'optionalAccess', _16 => _16.phase, 'call', _17 => _17("checking sdk compatibility")]);
1023
888
  }
1024
889
  const startup = await runStartupStage("SDK compatibility", async () => {
1025
- const baseUrl = _chunkFJCIUF34js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
1026
- if (maintenance !== "off") _chunkWLOCMJWVjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
1027
- const shouldDeferSkillsSync = maintenance === "off" || shouldDeferSkillsSyncForCommand();
1028
- const skillsVersion = shouldDeferSkillsSync ? void 0 : _chunkFJCIUF34js.readSdkSkillsLocalVersion.call(void 0, baseUrl);
1029
- const trusted = _chunkWLOCMJWVjs.readTrustedCleanCompatibility.call(void 0,
890
+ const baseUrl = _chunkFVLNYDI4js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
891
+ if (maintenance !== "off") _chunkLTFL4JRNjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
892
+ const shouldDeferSkillsSync = isToolExecuteCommand || maintenance === "off" || shouldDeferSkillsSyncForCommand();
893
+ const skillsVersion = shouldDeferSkillsSync ? void 0 : _chunkFVLNYDI4js.readSdkSkillsLocalVersion.call(void 0, baseUrl);
894
+ const trusted = isToolExecuteCommand ? null : _chunkLTFL4JRNjs.readTrustedCleanCompatibility.call(void 0,
1030
895
  baseUrl,
1031
896
  compatibilityCommand,
1032
897
  skillsVersion
1033
898
  );
1034
- const fastDeadline = trusted === null && _chunkWLOCMJWVjs.readFreshCleanCompatibility.call(void 0,
899
+ const fastDeadline = !isToolExecuteCommand && trusted === null && _chunkLTFL4JRNjs.readFreshCleanCompatibility.call(void 0,
1035
900
  baseUrl,
1036
901
  compatibilityCommand,
1037
902
  skillsVersion
1038
903
  ) !== null;
1039
904
  if (trusted) {
1040
- _chunkJGHG4NBAjs.recordCliTrace.call(void 0, {
905
+ _chunkOBB4QXHAjs.recordCliTrace.call(void 0, {
1041
906
  phase: "cli.sdk_compatibility",
1042
907
  ms: 0,
1043
908
  ok: true,
@@ -1047,7 +912,7 @@ Exit codes:
1047
912
  source: "trusted_cache"
1048
913
  });
1049
914
  }
1050
- const compatibility = trusted ? { response: trusted, error: null } : await _chunkJGHG4NBAjs.traceCliSpan.call(void 0,
915
+ const compatibility = trusted ? { response: trusted, error: null } : await _chunkOBB4QXHAjs.traceCliSpan.call(void 0,
1051
916
  "cli.sdk_compatibility",
1052
917
  {
1053
918
  baseUrl,
@@ -1055,12 +920,12 @@ Exit codes:
1055
920
  skillsVersion: _nullishCoalesce(skillsVersion, () => ( null)),
1056
921
  fastDeadline
1057
922
  },
1058
- () => _chunkWLOCMJWVjs.checkSdkCompatibility.call(void 0, baseUrl, {
923
+ () => _chunkLTFL4JRNjs.checkSdkCompatibility.call(void 0, baseUrl, {
1059
924
  command: compatibilityCommand,
1060
925
  skillsVersion,
1061
- persistCache: maintenance !== "off",
1062
- catalog: _chunkWNUR6VP5js.compatibilityCatalog.call(void 0, actionCommand),
1063
- ...fastDeadline ? { timeoutMs: _chunkWLOCMJWVjs.SDK_COMPATIBILITY_FAST_DEADLINE_MS } : {}
926
+ persistCache: !isToolExecuteCommand && maintenance !== "off",
927
+ catalog: _chunk5TUGWDEBjs.compatibilityCatalog.call(void 0, actionCommand),
928
+ ...fastDeadline ? { timeoutMs: _chunkLTFL4JRNjs.SDK_COMPATIBILITY_FAST_DEADLINE_MS } : {}
1064
929
  })
1065
930
  );
1066
931
  if (compatibility.error) {
@@ -1071,7 +936,7 @@ Exit codes:
1071
936
  response: null
1072
937
  };
1073
938
  }
1074
- const relaunched = await maybeAutoUpdateAndRelaunch(
939
+ const relaunched = await _chunk5TUGWDEBjs.maybeAutoUpdateAndRelaunch.call(void 0,
1075
940
  compatibility.response,
1076
941
  baseUrl,
1077
942
  maintenance
@@ -1084,13 +949,15 @@ Exit codes:
1084
949
  response: compatibility.response
1085
950
  };
1086
951
  }
1087
- const jsonOutput = _chunkYD7B53RWjs.isJsonOutputMode.call(void 0, );
1088
- _chunkWLOCMJWVjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
1089
- quietAdvisory: jsonOutput
952
+ const policy = compatibility.response;
953
+ const jsonOutput = _chunkNF4V5DTYjs.isJsonOutputMode.call(void 0, );
954
+ _chunkLTFL4JRNjs.enforceSdkCompatibilityResponse.call(void 0, policy, {
955
+ quietAdvisory: jsonOutput || // The queued update already says what is about to happen.
956
+ _chunk5TUGWDEBjs.hasDeferredAutoUpdate.call(void 0, ) || maintenance === "off" || !_chunkLTFL4JRNjs.claimUpdateAdvisory.call(void 0, baseUrl)
1090
957
  });
1091
958
  const advisory = compatibility.response;
1092
- if (jsonOutput && advisory && (advisory.status === "deprecated" || advisory.status === "update_available") && !_chunkWLOCMJWVjs.isCiEnvironment.call(void 0, )) {
1093
- _chunkYD7B53RWjs.addJsonNotice.call(void 0, { code: advisory.status, message: advisory.message });
959
+ if (jsonOutput && advisory && (advisory.status === "deprecated" || advisory.status === "update_available") && !_chunkLTFL4JRNjs.isCiEnvironment.call(void 0, ) && !_chunk5TUGWDEBjs.hasDeferredAutoUpdate.call(void 0, )) {
960
+ _chunkNF4V5DTYjs.addJsonNotice.call(void 0, { code: advisory.status, message: advisory.message });
1094
961
  }
1095
962
  return {
1096
963
  shouldContinue: true,
@@ -1101,16 +968,16 @@ Exit codes:
1101
968
  });
1102
969
  if (!startup.shouldContinue) return;
1103
970
  if (printStartupPhase) {
1104
- _optionalChain([progress, 'optionalAccess', _43 => _43.phase, 'call', _44 => _44("checking sdk skills")]);
971
+ _optionalChain([progress, 'optionalAccess', _18 => _18.phase, 'call', _19 => _19("checking sdk skills")]);
1105
972
  }
1106
973
  if (!startup.shouldDeferSkillsSync) {
1107
974
  const skillsUpdate = startup.response && Object.prototype.hasOwnProperty.call(startup.response, "skills") ? _nullishCoalesce(startup.response.skills, () => ( null)) : void 0;
1108
975
  await runStartupStage(
1109
976
  "agent skills sync",
1110
- () => _chunkJGHG4NBAjs.traceCliSpan.call(void 0,
977
+ () => _chunkOBB4QXHAjs.traceCliSpan.call(void 0,
1111
978
  "cli.sdk_skills_sync",
1112
979
  { baseUrl: startup.baseUrl },
1113
- () => _chunkWLOCMJWVjs.syncSdkSkillsIfNeeded.call(void 0, startup.baseUrl, {
980
+ () => _chunkLTFL4JRNjs.syncSdkSkillsIfNeeded.call(void 0, startup.baseUrl, {
1114
981
  update: skillsUpdate,
1115
982
  mode: "detached"
1116
983
  })
@@ -1119,12 +986,19 @@ Exit codes:
1119
986
  }
1120
987
  });
1121
988
  const requestedCommand = process.argv[2];
989
+ const commandRegistrationStartedAt = _chunkOBB4QXHAjs.isCliTraceEnabled.call(void 0, ) ? performance.now() : void 0;
1122
990
  await registerDeeplineCommandGroups(
1123
991
  program,
1124
992
  !requestedCommand || requestedCommand === "help" || requestedCommand.startsWith("-") && !["-v", "--version"].includes(requestedCommand) ? void 0 : requestedCommand
1125
993
  );
994
+ if (commandRegistrationStartedAt !== void 0) {
995
+ _chunkOBB4QXHAjs.recordCliTrace.call(void 0, {
996
+ phase: "cli.command_registration",
997
+ ms: performance.now() - commandRegistrationStartedAt
998
+ });
999
+ }
1126
1000
  const { preflight, health, version } = registerDeeplineInlineCommands(program);
1127
- if (_chunkYD7B53RWjs.isJsonOutputMode.call(void 0, )) silenceCommanderErrorOutput(program);
1001
+ if (_chunkNF4V5DTYjs.isJsonOutputMode.call(void 0, )) silenceCommanderErrorOutput(program);
1128
1002
  preflight.addHelpText(
1129
1003
  "after",
1130
1004
  `
@@ -1139,8 +1013,8 @@ Examples:
1139
1013
  `
1140
1014
  ).action(async (options) => {
1141
1015
  const data = await runPreflightCheck();
1142
- if (_chunkYD7B53RWjs.shouldEmitJson.call(void 0, options.json)) {
1143
- _chunkYD7B53RWjs.printJson.call(void 0, data);
1016
+ if (_chunkNF4V5DTYjs.shouldEmitJson.call(void 0, options.json)) {
1017
+ _chunkNF4V5DTYjs.printJson.call(void 0, data);
1144
1018
  } else {
1145
1019
  printPreflightHuman(data);
1146
1020
  }
@@ -1162,7 +1036,7 @@ Examples:
1162
1036
  ).action(async (options) => {
1163
1037
  if (options.playRunner) {
1164
1038
  const data = await runPlayRunnerHealthCheck();
1165
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0, data, {
1039
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0, data, {
1166
1040
  json: options.json,
1167
1041
  text: `play runner: ${data.playRunner.status} (${data.playRunner.check})
1168
1042
  `
@@ -1170,15 +1044,15 @@ Examples:
1170
1044
  return;
1171
1045
  }
1172
1046
  try {
1173
- const { httpJson, readStatusBanner, statusBannerLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-F6BX32XZ.js")));
1174
- const baseUrl = _chunkFJCIUF34js.resolveBaseUrlOnly.call(void 0, );
1047
+ const { httpJson, readStatusBanner, statusBannerLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-UG4WOYGL.js")));
1048
+ const baseUrl = _chunkFVLNYDI4js.resolveBaseUrlOnly.call(void 0, );
1175
1049
  const [{ status, data }, banner] = await Promise.all([
1176
1050
  httpJson("GET", `${baseUrl}/api/v2/health`, null),
1177
1051
  readStatusBanner(baseUrl)
1178
1052
  ]);
1179
1053
  if (status !== 200) throw new Error(`HTTP ${status}`);
1180
1054
  const lines = [`${baseUrl}: ${data.status}`, statusBannerLine(banner)];
1181
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
1055
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
1182
1056
  { ...data, status_banner: banner },
1183
1057
  {
1184
1058
  json: options.json,
@@ -1206,16 +1080,16 @@ Examples:
1206
1080
  `
1207
1081
  ).action((options) => {
1208
1082
  if (options.json) {
1209
- _chunkYD7B53RWjs.printCompactJson.call(void 0, { version: _chunkFJCIUF34js.SDK_VERSION });
1083
+ _chunkNF4V5DTYjs.printCompactJson.call(void 0, { version: _chunkFVLNYDI4js.SDK_VERSION });
1210
1084
  return;
1211
1085
  }
1212
- process.stdout.write(`deepline ${_chunkFJCIUF34js.SDK_VERSION}
1086
+ process.stdout.write(`deepline ${_chunkFVLNYDI4js.SDK_VERSION}
1213
1087
  `);
1214
1088
  });
1215
1089
  if (process.argv.slice(2).length === 0) {
1216
1090
  program.outputHelp({ error: true });
1217
1091
  console.error("\nerror: missing command (see usage above)");
1218
- _chunkJGHG4NBAjs.recordCliTrace.call(void 0, {
1092
+ _chunkOBB4QXHAjs.recordCliTrace.call(void 0, {
1219
1093
  phase: "cli.main_total",
1220
1094
  ms: Date.now() - mainStartedAt,
1221
1095
  ok: false,
@@ -1227,16 +1101,16 @@ Examples:
1227
1101
  const requestedTopLevelCommand = _nullishCoalesce(process.argv.slice(2)[0], () => ( ""));
1228
1102
  if (!topLevelCommandKnown(program, requestedTopLevelCommand)) {
1229
1103
  const unknownCommandMessage = `error: unknown command '${requestedTopLevelCommand}'`;
1230
- if (!_chunkYD7B53RWjs.isJsonOutputMode.call(void 0, )) console.error(unknownCommandMessage);
1231
- const baseUrl = _chunkFJCIUF34js.autoDetectBaseUrl.call(void 0, );
1104
+ if (!_chunkNF4V5DTYjs.isJsonOutputMode.call(void 0, )) console.error(unknownCommandMessage);
1105
+ const baseUrl = _chunkFVLNYDI4js.autoDetectBaseUrl.call(void 0, );
1232
1106
  await ensureTransport();
1233
1107
  const versionHint = await newerCliCommandHint(
1234
1108
  baseUrl,
1235
1109
  requestedTopLevelCommand
1236
1110
  );
1237
- if (_chunkYD7B53RWjs.isJsonOutputMode.call(void 0, )) {
1111
+ if (_chunkNF4V5DTYjs.isJsonOutputMode.call(void 0, )) {
1238
1112
  if (versionHint) {
1239
- _chunkYD7B53RWjs.addJsonNotice.call(void 0, { code: "newer_cli_command", message: versionHint });
1113
+ _chunkNF4V5DTYjs.addJsonNotice.call(void 0, { code: "newer_cli_command", message: versionHint });
1240
1114
  }
1241
1115
  printUsageErrorJson(
1242
1116
  "commander.unknownCommand",
@@ -1258,32 +1132,32 @@ Examples:
1258
1132
  const helpArgs = process.argv.slice(2);
1259
1133
  const helpPositionals = helpArgs.filter((arg) => !arg.startsWith("-"));
1260
1134
  if (helpPositionals.length === 0 ? helpArgs.includes("--help") || helpArgs.includes("-h") : helpPositionals.length === 1 && helpPositionals[0] === "help") {
1261
- const { authStatusLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-F6BX32XZ.js")));
1262
- rootHelpStatus = `Version: ${_chunkFJCIUF34js.SDK_VERSION}
1135
+ const { authStatusLine } = await Promise.resolve().then(() => _interopRequireWildcard(require("./auth-UG4WOYGL.js")));
1136
+ rootHelpStatus = `Version: ${_chunkFVLNYDI4js.SDK_VERSION}
1263
1137
  ${await authStatusLine()}
1264
1138
  `;
1265
1139
  }
1266
1140
  await program.parseAsync(process.argv);
1267
- _chunkJGHG4NBAjs.recordCliTrace.call(void 0, {
1141
+ _chunkOBB4QXHAjs.recordCliTrace.call(void 0, {
1268
1142
  phase: "cli.main_total",
1269
1143
  ms: Date.now() - mainStartedAt,
1270
1144
  ok: true
1271
1145
  });
1272
- await _chunkWLOCMJWVjs.maybeReportSdkCliFailure.call(void 0, {
1146
+ await _chunkLTFL4JRNjs.maybeReportSdkCliFailure.call(void 0, {
1273
1147
  argv: process.argv.slice(2),
1274
1148
  startedAtMs: mainStartedAt,
1275
1149
  exitCode: typeof process.exitCode === "number" ? process.exitCode : null
1276
1150
  });
1277
1151
  } catch (error) {
1278
1152
  const commanderError = asCommanderError(error);
1279
- _chunkJGHG4NBAjs.recordCliTrace.call(void 0, {
1153
+ _chunkOBB4QXHAjs.recordCliTrace.call(void 0, {
1280
1154
  phase: "cli.main_total",
1281
1155
  ms: Date.now() - mainStartedAt,
1282
1156
  ok: false,
1283
1157
  error: error instanceof Error ? error.message : String(error)
1284
1158
  });
1285
- _optionalChain([progress, 'optionalAccess', _45 => _45.fail, 'call', _46 => _46()]);
1286
- const wantsJson = _chunkYD7B53RWjs.isJsonOutputMode.call(void 0, );
1159
+ _optionalChain([progress, 'optionalAccess', _20 => _20.fail, 'call', _21 => _21()]);
1160
+ const wantsJson = _chunkNF4V5DTYjs.isJsonOutputMode.call(void 0, );
1287
1161
  if (commanderError) {
1288
1162
  const grammarError = [
1289
1163
  "commander.unknownCommand",
@@ -1294,12 +1168,12 @@ ${await authStatusLine()}
1294
1168
  if (grammarError) {
1295
1169
  await ensureTransport();
1296
1170
  const versionHint = await newerCliCommandHint(
1297
- _chunkFJCIUF34js.autoDetectBaseUrl.call(void 0, ),
1171
+ _chunkFVLNYDI4js.autoDetectBaseUrl.call(void 0, ),
1298
1172
  commandPath
1299
1173
  );
1300
1174
  if (wantsJson) {
1301
1175
  if (versionHint) {
1302
- _chunkYD7B53RWjs.addJsonNotice.call(void 0, { code: "newer_cli_command", message: versionHint });
1176
+ _chunkNF4V5DTYjs.addJsonNotice.call(void 0, { code: "newer_cli_command", message: versionHint });
1303
1177
  }
1304
1178
  } else {
1305
1179
  if (versionHint) console.error(versionHint);
@@ -1318,46 +1192,50 @@ ${await authStatusLine()}
1318
1192
  process.exitCode = commanderError.code === "commander.unknownCommand" && !wantsJson ? 2 : _nullishCoalesce(commanderError.exitCode, () => ( 1));
1319
1193
  return;
1320
1194
  } else if (wantsJson) {
1321
- if (error instanceof _chunkQ2E4E4FJjs.AuthError) {
1322
- _chunkYD7B53RWjs.addJsonNotice.call(void 0, {
1195
+ if (error instanceof _chunkNPBJI7REjs.AuthError) {
1196
+ _chunkNF4V5DTYjs.addJsonNotice.call(void 0, {
1323
1197
  code: "auth_required",
1324
1198
  message: `Not authenticated. Run: ${AUTH_RECOVERY_COMMAND}`
1325
1199
  });
1326
1200
  }
1327
- const providerConcurrency = _chunkYD7B53RWjs.formatProviderConcurrencyDiagnostic.call(void 0, error);
1201
+ const providerConcurrency = _chunkNF4V5DTYjs.formatProviderConcurrencyDiagnostic.call(void 0, error);
1328
1202
  if (providerConcurrency) {
1329
- _chunkYD7B53RWjs.addJsonNotice.call(void 0, {
1203
+ _chunkNF4V5DTYjs.addJsonNotice.call(void 0, {
1330
1204
  code: "provider_concurrency",
1331
1205
  message: providerConcurrency
1332
1206
  });
1333
1207
  }
1334
- _chunkYD7B53RWjs.printJson.call(void 0, {
1335
- ..._chunkYD7B53RWjs.errorToJsonPayload.call(void 0, error),
1336
- ...error instanceof _chunkQ2E4E4FJjs.AuthError ? { next: AUTH_RECOVERY_COMMAND } : {}
1208
+ _chunkNF4V5DTYjs.printJson.call(void 0, {
1209
+ ..._chunkNF4V5DTYjs.errorToJsonPayload.call(void 0, error),
1210
+ ...error instanceof _chunkNPBJI7REjs.AuthError ? { next: AUTH_RECOVERY_COMMAND } : {}
1337
1211
  });
1338
1212
  } else if (error instanceof Error) {
1339
1213
  console.error(`Error: ${error.message}`);
1340
- const toolDiagnostic = _chunkYD7B53RWjs.formatToolExecutionErrorDiagnostic.call(void 0, error);
1214
+ const toolDiagnostic = _chunkNF4V5DTYjs.formatToolExecutionErrorDiagnostic.call(void 0, error);
1341
1215
  if (toolDiagnostic) console.error(toolDiagnostic);
1342
- if (error instanceof _chunkQ2E4E4FJjs.AuthError) {
1216
+ if (error instanceof _chunkNPBJI7REjs.AuthError) {
1343
1217
  console.error(`Not authenticated. Run: ${AUTH_RECOVERY_COMMAND}`);
1344
1218
  }
1345
- const providerConcurrency = _chunkYD7B53RWjs.formatProviderConcurrencyDiagnostic.call(void 0, error);
1219
+ const providerConcurrency = _chunkNF4V5DTYjs.formatProviderConcurrencyDiagnostic.call(void 0, error);
1346
1220
  if (providerConcurrency) console.error(providerConcurrency);
1347
1221
  } else {
1348
1222
  console.error(`Error: ${String(error)}`);
1349
1223
  }
1350
1224
  const explicitExitCode = error && typeof error === "object" && typeof error.exitCode === "number" ? error.exitCode : void 0;
1351
- const failureExitCode = _nullishCoalesce(explicitExitCode, () => ( _chunkWLOCMJWVjs.resolveSdkCliFailureExitCode.call(void 0, error)));
1225
+ const failureExitCode = _nullishCoalesce(explicitExitCode, () => ( _chunkLTFL4JRNjs.resolveSdkCliFailureExitCode.call(void 0, error)));
1352
1226
  process.exitCode = failureExitCode;
1353
- await _chunkWLOCMJWVjs.maybeReportSdkCliFailure.call(void 0, {
1227
+ await _chunkLTFL4JRNjs.maybeReportSdkCliFailure.call(void 0, {
1354
1228
  argv: process.argv.slice(2),
1355
1229
  startedAtMs: mainStartedAt,
1356
1230
  exitCode: failureExitCode,
1357
1231
  error
1358
1232
  });
1359
1233
  } finally {
1360
- _chunkWNUR6VP5js.finishToolExecuteCommand.call(void 0, );
1234
+ _chunk5TUGWDEBjs.finishToolExecuteCommand.call(void 0, );
1235
+ const maintainInlinePlay = deferredMaintenance.inlinePlay;
1236
+ deferredMaintenance.inlinePlay = null;
1237
+ await _optionalChain([maintainInlinePlay, 'optionalCall', _22 => _22()]);
1238
+ await _chunk5TUGWDEBjs.runDeferredAutoUpdate.call(void 0, );
1361
1239
  }
1362
1240
  process.exitCode = _nullishCoalesce(process.exitCode, () => ( 0));
1363
1241
  }
@@ -1365,38 +1243,48 @@ async function main() {
1365
1243
  let disposeTransport;
1366
1244
  const ensureTransport = async () => {
1367
1245
  if (disposeTransport) return;
1246
+ const transportStartedAt = _chunkOBB4QXHAjs.isCliTraceEnabled.call(void 0, ) ? performance.now() : void 0;
1368
1247
  const hasProxy = [
1369
1248
  "HTTP_PROXY",
1370
1249
  "http_proxy",
1371
1250
  "HTTPS_PROXY",
1372
1251
  "https_proxy"
1373
- ].some((name) => _optionalChain([process, 'access', _47 => _47.env, 'access', _48 => _48[name], 'optionalAccess', _49 => _49.trim, 'call', _50 => _50()]));
1252
+ ].some((name) => _optionalChain([process, 'access', _23 => _23.env, 'access', _24 => _24[name], 'optionalAccess', _25 => _25.trim, 'call', _26 => _26()]));
1374
1253
  if (!process.versions.bun || hasProxy) {
1375
1254
  const { configureCliTransport } = await Promise.resolve().then(() => _interopRequireWildcard(require("./proxy-env-ZV2WZFAT.js")));
1376
1255
  disposeTransport = configureCliTransport();
1377
1256
  }
1257
+ if (transportStartedAt !== void 0) {
1258
+ _chunkOBB4QXHAjs.recordCliTrace.call(void 0, {
1259
+ phase: "cli.transport_setup",
1260
+ ms: performance.now() - transportStartedAt
1261
+ });
1262
+ }
1378
1263
  };
1379
1264
  const reportOutputSize = startOutputSizeReporting({
1380
1265
  argv: process.argv.slice(2),
1381
1266
  startedAtMs: Date.now()
1382
1267
  });
1383
1268
  let action = null;
1269
+ let skipOutputReport = false;
1384
1270
  try {
1385
1271
  await runMain(ensureTransport, (dispatched) => {
1386
1272
  action = dispatched;
1273
+ skipOutputReport = dispatched.path === "tools execute" || dispatched.path === "plays run" && process.argv.includes("--json");
1387
1274
  });
1388
- const silentFailure = _chunkYD7B53RWjs.takeSilentJsonFailureMessage.call(void 0, process.exitCode);
1275
+ const silentFailure = _chunkNF4V5DTYjs.takeSilentJsonFailureMessage.call(void 0, process.exitCode);
1389
1276
  if (silentFailure) {
1390
- _chunkYD7B53RWjs.printJson.call(void 0, {
1277
+ _chunkNF4V5DTYjs.printJson.call(void 0, {
1391
1278
  ok: false,
1392
1279
  exitCode: Number(process.exitCode),
1393
1280
  error: { code: "CLI_ERROR", message: silentFailure }
1394
1281
  });
1395
1282
  }
1396
1283
  await ensureTransport();
1397
- await reportOutputSize({ exitCode: process.exitCode, action });
1284
+ if (!skipOutputReport)
1285
+ await reportOutputSize({ exitCode: process.exitCode, action });
1398
1286
  } finally {
1399
- await _optionalChain([disposeTransport, 'optionalCall', _51 => _51()]);
1287
+ await _optionalChain([disposeTransport, 'optionalCall', _27 => _27()]);
1400
1288
  }
1401
1289
  }
1402
1290
  var DEV_CLI_AWAIT_MAIN = Symbol.for("@deepline/sdk/dev-cli-await-main");