deepline 0.3.409 → 0.3.411

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 (215) 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/monitors/package.json +1 -1
  21. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +3 -1
  22. package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +1 -1
  23. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +277 -76
  24. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
  25. package/dist/bundling-sources/shared_libs/play-runtime/dataset-row-input.ts +124 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +6 -62
  27. package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +1 -0
  28. package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +67 -0
  29. package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +64 -6
  30. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +1 -5
  31. package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +1 -1
  32. package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +3 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +10 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +3 -0
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/egress-probe.ts +3 -0
  36. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +26 -16
  37. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +36 -11
  38. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +35 -0
  39. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +21 -0
  40. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +21 -6
  41. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +11 -2
  42. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +85 -20
  43. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +71 -13
  44. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-execution-queries.ts +100 -0
  45. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +9 -5
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +337 -146
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +26 -12
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +3 -1
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +425 -102
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +4 -0
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +9 -0
  53. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +181 -124
  54. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +152 -0
  55. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +5 -3
  56. package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +31 -0
  57. package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +10 -0
  58. package/dist/bundling-sources/shared_libs/plays/ambiguous-write-error.ts +25 -0
  59. package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +4 -0
  60. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +63 -68
  61. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +129 -63
  62. package/dist/bundling-sources/shared_libs/plays/contracts.ts +14 -0
  63. package/dist/bundling-sources/shared_libs/plays/enrich-play-compiler.ts +58 -16
  64. package/dist/bundling-sources/shared_libs/plays/fetch-http-error.ts +50 -0
  65. package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +351 -0
  66. package/dist/bundling-sources/shared_libs/plays/tool-list-getter-mode.ts +9 -0
  67. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
  68. package/dist/cli/auth-M7TBLW55.js +40 -0
  69. package/dist/cli/{auth-5HIIACF7.mjs → auth-YD6ZTMB2.mjs} +6 -6
  70. package/dist/cli/{billing-4275N7FL.js → billing-2L3MOB42.js} +84 -84
  71. package/dist/cli/{billing-EVZ3ZWKC.mjs → billing-ZT46GV4C.mjs} +8 -8
  72. package/dist/cli/{chunk-ZAAKSJAS.js → chunk-27GJKC5Q.js} +17 -10
  73. package/dist/cli/{chunk-UHNDVD3P.js → chunk-2H4EY7KH.js} +100 -41
  74. package/dist/cli/{chunk-GAICVLKL.js → chunk-2NI6DHN7.js} +2 -2
  75. package/dist/cli/{chunk-JGHG4NBA.js → chunk-2WUY3VNK.js} +19 -4
  76. package/dist/cli/{chunk-FHPCKULR.mjs → chunk-4BA6ATHA.mjs} +2 -2
  77. package/dist/cli/{chunk-RTCDW2GU.js → chunk-4O4WNFFC.js} +170 -49
  78. package/dist/cli/{chunk-OSDXE27V.mjs → chunk-4PG4ARL2.mjs} +17 -10
  79. package/dist/cli/{chunk-AU4OFDFX.js → chunk-5IGDNBG7.js} +26 -26
  80. package/dist/cli/{chunk-WYQO2CBS.mjs → chunk-5LRWWMRV.mjs} +149 -28
  81. package/dist/cli/{chunk-PMVFAYL7.mjs → chunk-63ILLN5H.mjs} +2 -2
  82. package/dist/cli/chunk-6AUE6JXY.js +35 -0
  83. package/dist/cli/chunk-7DSMMCXP.js +501 -0
  84. package/dist/cli/{chunk-6BJK4EJ3.mjs → chunk-AARWVK4C.mjs} +2132 -65
  85. package/dist/cli/{chunk-FERRDNMO.js → chunk-AD47BXN2.js} +5 -5
  86. package/dist/cli/{chunk-J6DCKJNM.mjs → chunk-BJV3VSKE.mjs} +16 -1
  87. package/dist/cli/{chunk-S6R3OX7B.js → chunk-E4CABWXL.js} +25 -2
  88. package/dist/cli/{chunk-NXGCO4JB.mjs → chunk-E4IXDAZI.mjs} +5 -0
  89. package/dist/cli/{chunk-BEVLCKXG.mjs → chunk-E4KBNNNB.mjs} +1 -1
  90. package/dist/cli/{chunk-2PRO2JTX.mjs → chunk-E52TKKVI.mjs} +36 -284
  91. package/dist/cli/chunk-FR2ILQ4G.mjs +8 -0
  92. package/dist/cli/{chunk-2GI3QD3L.js → chunk-FRVPOXGB.js} +644 -330
  93. package/dist/cli/chunk-G43JLBDE.mjs +501 -0
  94. package/dist/cli/{chunk-BZAMOCPA.mjs → chunk-IMZ56EOH.mjs} +3 -3
  95. package/dist/cli/chunk-IPGV6VFA.mjs +6084 -0
  96. package/dist/cli/{chunk-IT3XBJQR.mjs → chunk-IR3AKJAY.mjs} +330 -625
  97. package/dist/cli/chunk-J33TSWO5.js +8 -0
  98. package/dist/cli/chunk-JQMZUWNM.mjs +35 -0
  99. package/dist/cli/chunk-JYHSEGRM.js +6084 -0
  100. package/dist/cli/{chunk-JI2B4RZP.mjs → chunk-KCC3FKIW.mjs} +71 -12
  101. package/dist/cli/{chunk-6IKARAYD.mjs → chunk-L2VKAASU.mjs} +23 -0
  102. package/dist/cli/{chunk-O3VSXP2F.js → chunk-LWBM5FFL.js} +50 -50
  103. package/dist/cli/{chunk-VWBTTJYQ.mjs → chunk-M6OASCVL.mjs} +6 -3
  104. package/dist/cli/{chunk-YHPYUZZX.mjs → chunk-MAMVGOSC.mjs} +1 -1
  105. package/dist/cli/{chunk-Q2E4E4FJ.js → chunk-NPBJI7RE.js} +8 -8
  106. package/dist/cli/chunk-NQWIZ5PZ.js +313 -0
  107. package/dist/cli/{chunk-HQXL5526.mjs → chunk-NUX2QHNC.mjs} +1 -1
  108. package/dist/cli/{chunk-TQNHMWUR.mjs → chunk-OGSXENOF.mjs} +5 -2
  109. package/dist/cli/{chunk-SEFMGO3Z.js → chunk-OQQOXSYA.js} +2184 -117
  110. package/dist/cli/{chunk-FJCIUF34.js → chunk-OZSC6CEW.js} +128 -376
  111. package/dist/cli/{chunk-NZSF57UO.mjs → chunk-PO2VU6WV.mjs} +2 -2
  112. package/dist/cli/{chunk-7P5AA3SN.js → chunk-PPDBRJRW.js} +6 -1
  113. package/dist/cli/{chunk-ILHRA7AD.js → chunk-QADCFSGH.js} +7 -7
  114. package/dist/cli/{chunk-N44JHMKY.mjs → chunk-RFES6Q2J.mjs} +452 -138
  115. package/dist/cli/{chunk-DEC3JECC.js → chunk-RMINBDYY.js} +5 -2
  116. package/dist/cli/{chunk-WLOCMJWV.js → chunk-TPFD4F5S.js} +426 -721
  117. package/dist/cli/{chunk-V76R6HMV.js → chunk-U5AQKE3T.js} +1029 -806
  118. package/dist/cli/{chunk-PBZYY7VZ.mjs → chunk-UAEVKAUR.mjs} +734 -511
  119. package/dist/cli/{chunk-WHG43Z67.js → chunk-VGHWJL4W.js} +11 -8
  120. package/dist/cli/chunk-VKKVSFRD.js +62 -0
  121. package/dist/cli/{chunk-GSK6NHVM.js → chunk-WU4U6VSB.js} +5 -5
  122. package/dist/cli/chunk-XAB47ZRV.mjs +313 -0
  123. package/dist/cli/{chunk-JRAVVJ3T.mjs → chunk-XJD6LZCO.mjs} +2 -2
  124. package/dist/cli/chunk-ZCALLYF6.mjs +62 -0
  125. package/dist/cli/{chunk-YD7B53RW.js → chunk-ZHWBU36H.js} +12 -12
  126. package/dist/cli/{csv-A2MP6EFV.mjs → csv-BKNRRW7D.mjs} +5 -5
  127. package/dist/cli/{csv-BBOTCGQY.js → csv-SVDP2EU7.js} +14 -14
  128. package/dist/cli/{db-3W5DMTUX.mjs → db-LU4KLRM6.mjs} +15 -20
  129. package/dist/cli/{db-G4CODDCA.js → db-OQ6S7TTZ.js} +42 -47
  130. package/dist/cli/{describe-PQTQ5B6F.js → describe-45TGETKR.js} +27 -22
  131. package/dist/cli/{describe-XYJ2ZT4M.mjs → describe-U4KOGDRA.mjs} +20 -15
  132. package/dist/cli/describe-core.d.mts +2 -2
  133. package/dist/cli/describe-core.d.ts +2 -2
  134. package/dist/cli/describe-core.js +6 -6
  135. package/dist/cli/describe-core.mjs +5 -5
  136. package/dist/cli/{executions-UR67CA5H.mjs → executions-2GAAUXLA.mjs} +8 -8
  137. package/dist/cli/{executions-TLANVR7Y.js → executions-VZN56VRC.js} +10 -10
  138. package/dist/cli/{feedback-6C2YTRJL.js → feedback-NS76B5GU.js} +13 -9
  139. package/dist/cli/{feedback-WHCMGEIL.mjs → feedback-XW5IWA5R.mjs} +11 -7
  140. package/dist/cli/{git-GWLB6VSA.mjs → git-CLI66XP6.mjs} +6 -6
  141. package/dist/cli/git-VGYRGFEN.js +24 -0
  142. package/dist/cli/index.js +236 -348
  143. package/dist/cli/index.mjs +162 -274
  144. package/dist/cli/{legacy-noops-ZUFA7RWI.js → legacy-noops-HCFB3ZOV.js} +9 -9
  145. package/dist/cli/{legacy-noops-KF4XIFEF.mjs → legacy-noops-ODDOMLBL.mjs} +6 -6
  146. package/dist/cli/{monitors-TB3K2IVE.js → monitors-7WXQ7JFT.js} +94 -94
  147. package/dist/cli/{monitors-6UOIDIMB.mjs → monitors-ZXX456TE.mjs} +8 -8
  148. package/dist/cli/{org-CKWMBPIR.js → org-YLX5PHBQ.js} +68 -68
  149. package/dist/cli/{org-WGHHMVDZ.mjs → org-YUN3TLNP.mjs} +8 -8
  150. package/dist/cli/{play-LYPAXCLD.mjs → play-LL73A7EP.mjs} +533 -98
  151. package/dist/cli/{play-N2B3KAVS.js → play-YGOXL52D.js} +1067 -632
  152. package/dist/cli/{providers-6DI5BVZJ.mjs → providers-35QSAUHL.mjs} +8 -8
  153. package/dist/cli/{providers-UR42MD6Z.js → providers-RHCIU2PX.js} +11 -11
  154. package/dist/cli/{quickstart-MNA2S6PO.mjs → quickstart-6BN3LCZH.mjs} +5 -5
  155. package/dist/cli/{quickstart-FCJG4XGB.js → quickstart-ORMM4NRK.js} +7 -7
  156. package/dist/cli/search-EWDMUPHR.js +30 -0
  157. package/dist/cli/{search-VPPYUJ2M.mjs → search-GAERWLSE.mjs} +9 -9
  158. package/dist/cli/{secrets-QOSMVO36.js → secrets-3AFCTGT7.js} +17 -17
  159. package/dist/cli/{secrets-DRI4W7Z5.mjs → secrets-FCL5PALY.mjs} +8 -8
  160. package/dist/cli/sessions-3OEHEQG7.js +16 -0
  161. package/dist/cli/{sessions-DQNUKP43.mjs → sessions-RSSL7I7O.mjs} +6 -6
  162. package/dist/cli/{settings-DWDK3Y2R.mjs → settings-GE4NRE7Y.mjs} +12 -12
  163. package/dist/cli/{settings-JUGGCOPS.js → settings-RX5K4I7H.js} +79 -79
  164. package/dist/cli/{setup-AWBHNYXK.js → setup-N3ZNAEL5.js} +45 -44
  165. package/dist/cli/{setup-D5DWVNY4.mjs → setup-X3RXGG4F.mjs} +11 -10
  166. package/dist/cli/{skills-YV2XR35J.mjs → skills-5JEAJBDE.mjs} +7 -7
  167. package/dist/cli/skills-VAAQVEQC.js +29 -0
  168. package/dist/cli/tools-BYYOT2DU.js +44 -0
  169. package/dist/cli/{tools-VFJYHNV2.mjs → tools-JOKUWEBZ.mjs} +19 -14
  170. package/dist/cli/update-36G4ZD7B.js +31 -0
  171. package/dist/cli/{update-IM6VOTGL.mjs → update-UBHEVFR3.mjs} +11 -9
  172. package/dist/cli/{workflow-26URBWPV.mjs → workflow-FR6EXAXF.mjs} +44 -20
  173. package/dist/cli/{workflow-3BS6U6SL.js → workflow-SZAVOHN6.js} +54 -30
  174. package/dist/{client-BfInrZPB.d.mts → client-74k4IPh6.d.mts} +135 -54
  175. package/dist/{client-BMjJFpan.d.ts → client-C1IK1f8c.d.ts} +135 -54
  176. package/dist/{compiler-manifest-Ycx-hoAr.d.mts → compiler-manifest-lzWpbV3w.d.mts} +83 -66
  177. package/dist/{compiler-manifest-Ycx-hoAr.d.ts → compiler-manifest-lzWpbV3w.d.ts} +83 -66
  178. package/dist/{index-CZXgiN3E.d.mts → index-C8Cy-YTm.d.ts} +5 -1
  179. package/dist/{index-NPG5pqxQ.d.ts → index-CtNK-0nI.d.mts} +5 -1
  180. package/dist/index.d.mts +47 -9
  181. package/dist/index.d.ts +47 -9
  182. package/dist/index.js +17 -14
  183. package/dist/index.mjs +13 -10
  184. package/dist/install-integrity.json +118 -102
  185. package/dist/plays/bundle-play-file.d.mts +3 -3
  186. package/dist/plays/bundle-play-file.d.ts +3 -3
  187. package/dist/plays/bundle-play-file.mjs +5 -4
  188. package/dist/plays/csv-data-input.js +3 -3
  189. package/dist/plays/csv-data-input.mjs +2 -2
  190. package/dist/plays/play-description.d.mts +2 -2
  191. package/dist/plays/play-description.d.ts +2 -2
  192. package/dist/plays/run-request.d.mts +2 -2
  193. package/dist/plays/run-request.d.ts +2 -2
  194. package/dist/plays/run-request.js +11 -3
  195. package/dist/plays/run-request.mjs +10 -2
  196. package/dist/release.d.mts +15 -6
  197. package/dist/release.d.ts +15 -6
  198. package/dist/release.js +2 -2
  199. package/dist/release.mjs +1 -1
  200. package/package.json +2 -2
  201. package/dist/cli/auth-F6BX32XZ.js +0 -40
  202. package/dist/cli/chunk-264PC2RN.mjs +0 -83
  203. package/dist/cli/chunk-44ZTYHMQ.mjs +0 -155
  204. package/dist/cli/chunk-53HN7WZN.js +0 -392
  205. package/dist/cli/chunk-7AALNGTA.mjs +0 -392
  206. package/dist/cli/chunk-ALD4COBH.js +0 -155
  207. package/dist/cli/chunk-CLJGSOVM.mjs +0 -1716
  208. package/dist/cli/chunk-WNUR6VP5.js +0 -83
  209. package/dist/cli/chunk-Z4VNJOF7.js +0 -1716
  210. package/dist/cli/git-VQFF6D7C.js +0 -24
  211. package/dist/cli/search-NCEEONMQ.js +0 -30
  212. package/dist/cli/sessions-3WYKQABW.js +0 -16
  213. package/dist/cli/skills-AKPAJVSO.js +0 -29
  214. package/dist/cli/tools-RBKEK6PM.js +0 -39
  215. package/dist/cli/update-VFNUBLDA.js +0 -29
@@ -1,15 +1,32 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- canAutomaticallyApplyUpdatePlan,
4
- resolveUpdatePlan,
5
- runAutomaticUpdatePlan,
6
- shouldRunCliAutoUpdate
7
- } from "./chunk-WYQO2CBS.mjs";
8
- import "./chunk-BEVLCKXG.mjs";
3
+ beginToolExecuteCommand,
4
+ compatibilityCatalog,
5
+ finishToolExecuteCommand,
6
+ hasDeferredAutoUpdate,
7
+ maybeAutoUpdateAndRelaunch,
8
+ runDeferredAutoUpdate,
9
+ runToolExecuteStage
10
+ } from "./chunk-XAB47ZRV.mjs";
11
+ import "./chunk-5LRWWMRV.mjs";
12
+ import "./chunk-E4KBNNNB.mjs";
13
+ import "./chunk-G43JLBDE.mjs";
14
+ import {
15
+ usesInlinePlayAdmission
16
+ } from "./chunk-JQMZUWNM.mjs";
17
+ import {
18
+ isCliTraceEnabled,
19
+ parseCliMaintenancePolicy,
20
+ recordCliTrace,
21
+ resolveCliMaintenancePolicy,
22
+ traceCliSpan
23
+ } from "./chunk-BJV3VSKE.mjs";
9
24
  import {
10
25
  SDK_COMPATIBILITY_FAST_DEADLINE_MS,
11
26
  SKILLS_AUTO_SYNC_COMMAND,
12
27
  checkSdkCompatibility,
28
+ claimUpdateAdvisory,
29
+ createCliProgress,
13
30
  enforceSdkCompatibilityResponse,
14
31
  failureReportHeaders,
15
32
  flushDeferredSkillsSyncNotices,
@@ -22,20 +39,7 @@ import {
22
39
  resolveSdkCliFailureExitCode,
23
40
  sanitizeCommand,
24
41
  syncSdkSkillsIfNeeded
25
- } from "./chunk-IT3XBJQR.mjs";
26
- import {
27
- beginToolExecuteCommand,
28
- compatibilityCatalog,
29
- finishToolExecuteCommand,
30
- runToolExecuteStage
31
- } from "./chunk-264PC2RN.mjs";
32
- import {
33
- recordCliTrace,
34
- traceCliSpan
35
- } from "./chunk-J6DCKJNM.mjs";
36
- import {
37
- createCliProgress
38
- } from "./chunk-44ZTYHMQ.mjs";
42
+ } from "./chunk-IR3AKJAY.mjs";
39
43
  import {
40
44
  addJsonNotice,
41
45
  errorToJsonPayload,
@@ -48,7 +52,7 @@ import {
48
52
  printJson,
49
53
  shouldEmitJson,
50
54
  takeSilentJsonFailureMessage
51
- } from "./chunk-JRAVVJ3T.mjs";
55
+ } from "./chunk-XJD6LZCO.mjs";
52
56
  import {
53
57
  HttpClient,
54
58
  SDK_VERSION,
@@ -58,13 +62,13 @@ import {
58
62
  resolveApiKeyForBaseUrl,
59
63
  resolveBaseUrlOnly,
60
64
  resolveConfig
61
- } from "./chunk-2PRO2JTX.mjs";
65
+ } from "./chunk-E52TKKVI.mjs";
62
66
  import {
63
67
  AuthError
64
- } from "./chunk-YHPYUZZX.mjs";
68
+ } from "./chunk-MAMVGOSC.mjs";
65
69
  import "./chunk-DLIRSHV6.mjs";
66
- import "./chunk-NXGCO4JB.mjs";
67
- import "./chunk-TQNHMWUR.mjs";
70
+ import "./chunk-E4IXDAZI.mjs";
71
+ import "./chunk-OGSXENOF.mjs";
68
72
  import "./chunk-WZYKRD7T.mjs";
69
73
  import {
70
74
  commandDocKey,
@@ -134,48 +138,48 @@ import { Command as Command2 } from "commander";
134
138
  var COMMAND_GROUPS = [
135
139
  {
136
140
  names: ["auth"],
137
- load: async () => (await import("./auth-5HIIACF7.mjs")).registerAuthCommands
141
+ load: async () => (await import("./auth-YD6ZTMB2.mjs")).registerAuthCommands
138
142
  },
139
143
  {
140
144
  names: ["providers"],
141
- load: async () => (await import("./providers-6DI5BVZJ.mjs")).registerProviderCommands
145
+ load: async () => (await import("./providers-35QSAUHL.mjs")).registerProviderCommands
142
146
  },
143
147
  {
144
148
  names: ["search"],
145
- load: async () => (await import("./search-VPPYUJ2M.mjs")).registerSearchCommand
149
+ load: async () => (await import("./search-GAERWLSE.mjs")).registerSearchCommand
146
150
  },
147
151
  {
148
152
  names: ["describe"],
149
- load: async () => (await import("./describe-XYJ2ZT4M.mjs")).registerDescribeCommand
153
+ load: async () => (await import("./describe-U4KOGDRA.mjs")).registerDescribeCommand
150
154
  },
151
155
  {
152
156
  names: ["tools"],
153
- load: async () => (await import("./tools-VFJYHNV2.mjs")).registerToolsCommands
157
+ load: async () => (await import("./tools-JOKUWEBZ.mjs")).registerToolsCommands
154
158
  },
155
159
  {
156
160
  names: ["executions"],
157
- load: async () => (await import("./executions-UR67CA5H.mjs")).registerExecutionsCommands
161
+ load: async () => (await import("./executions-2GAAUXLA.mjs")).registerExecutionsCommands
158
162
  },
159
163
  {
160
164
  names: ["plays", "runs"],
161
- load: async () => (await import("./play-LYPAXCLD.mjs")).registerPlayCommands
165
+ load: async () => (await import("./play-LL73A7EP.mjs")).registerPlayCommands
162
166
  },
163
167
  {
164
168
  names: ["sessions"],
165
- load: async () => (await import("./sessions-DQNUKP43.mjs")).registerSessionsCommands
169
+ load: async () => (await import("./sessions-RSSL7I7O.mjs")).registerSessionsCommands
166
170
  },
167
171
  {
168
172
  names: ["workflows"],
169
- load: async () => (await import("./workflow-26URBWPV.mjs")).registerWorkflowCommands
173
+ load: async () => (await import("./workflow-FR6EXAXF.mjs")).registerWorkflowCommands
170
174
  },
171
175
  {
172
176
  names: ["secrets"],
173
- load: async () => (await import("./secrets-DRI4W7Z5.mjs")).registerSecretsCommands
177
+ load: async () => (await import("./secrets-FCL5PALY.mjs")).registerSecretsCommands
174
178
  },
175
179
  {
176
180
  names: ["settings", "notifications"],
177
181
  load: async () => {
178
- const commands = await import("./settings-DWDK3Y2R.mjs");
182
+ const commands = await import("./settings-GE4NRE7Y.mjs");
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 import("./billing-EVZ3ZWKC.mjs")).registerBillingCommands
191
+ load: async () => (await import("./billing-ZT46GV4C.mjs")).registerBillingCommands
188
192
  },
189
193
  {
190
194
  names: ["monitors"],
191
- load: async () => (await import("./monitors-6UOIDIMB.mjs")).registerMonitorsCommands
195
+ load: async () => (await import("./monitors-ZXX456TE.mjs")).registerMonitorsCommands
192
196
  },
193
197
  {
194
198
  names: ["org"],
195
- load: async () => (await import("./org-WGHHMVDZ.mjs")).registerOrgCommands
199
+ load: async () => (await import("./org-YUN3TLNP.mjs")).registerOrgCommands
196
200
  },
197
201
  {
198
202
  names: ["git", "projects", "deployments"],
199
- load: async () => (await import("./git-GWLB6VSA.mjs")).registerGitCommands
203
+ load: async () => (await import("./git-CLI66XP6.mjs")).registerGitCommands
200
204
  },
201
205
  {
202
206
  names: ["csv"],
203
- load: async () => (await import("./csv-A2MP6EFV.mjs")).registerCsvCommands
207
+ load: async () => (await import("./csv-BKNRRW7D.mjs")).registerCsvCommands
204
208
  },
205
209
  {
206
210
  names: ["db"],
207
- load: async () => (await import("./db-3W5DMTUX.mjs")).registerDbCommands
211
+ load: async () => (await import("./db-LU4KLRM6.mjs")).registerDbCommands
208
212
  },
209
213
  {
210
214
  names: ["feedback"],
211
- load: async () => (await import("./feedback-WHCMGEIL.mjs")).registerFeedbackCommands
215
+ load: async () => (await import("./feedback-XW5IWA5R.mjs")).registerFeedbackCommands
212
216
  },
213
217
  {
214
218
  names: ["enrich", "session", "backend"],
215
- load: async () => (await import("./legacy-noops-KF4XIFEF.mjs")).registerDeprecatedCommands
219
+ load: async () => (await import("./legacy-noops-ODDOMLBL.mjs")).registerDeprecatedCommands
216
220
  },
217
221
  {
218
222
  names: ["update"],
219
- load: async () => (await import("./update-IM6VOTGL.mjs")).registerUpdateCommand
223
+ load: async () => (await import("./update-UBHEVFR3.mjs")).registerUpdateCommand
220
224
  },
221
225
  {
222
226
  names: ["skills", "skills-auto-sync"],
223
- load: async () => (await import("./skills-YV2XR35J.mjs")).registerSkillsCommand
227
+ load: async () => (await import("./skills-5JEAJBDE.mjs")).registerSkillsCommand
224
228
  },
225
229
  {
226
230
  names: ["setup", "doctor"],
227
- load: async () => (await import("./setup-D5DWVNY4.mjs")).registerSetupCommands
231
+ load: async () => (await import("./setup-X3RXGG4F.mjs")).registerSetupCommands
228
232
  },
229
233
  {
230
234
  names: ["quickstart"],
231
- load: async () => (await import("./quickstart-MNA2S6PO.mjs")).registerQuickstartCommands
235
+ load: async () => (await import("./quickstart-6BN3LCZH.mjs")).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 = readSdkSkillsLocalVersion(input.baseUrl);
262
+ const compatibility = await traceCliSpan(
263
+ "cli.sdk_compatibility_deferred",
264
+ {
265
+ baseUrl: input.baseUrl,
266
+ command: "plays run",
267
+ skillsVersion: skillsVersion ?? null
268
+ },
269
+ () => checkSdkCompatibility(input.baseUrl, {
270
+ command: "plays run",
271
+ skillsVersion,
272
+ persistCache: input.policy !== "off",
273
+ catalog: compatibilityCatalog(input.command)
274
+ })
275
+ );
276
+ if (compatibility.error || !compatibility.response) return;
277
+ const automaticUpdate = compatibility.response.auto_update;
278
+ if (automaticUpdate?.should_auto_update && !automaticUpdate.required && automaticUpdate.reason !== "rollback_forced") {
279
+ await maybeAutoUpdateAndRelaunch(
280
+ compatibility.response,
281
+ input.baseUrl,
282
+ input.policy
283
+ );
284
+ }
285
+ const skillsUpdate = Object.prototype.hasOwnProperty.call(
286
+ compatibility.response,
287
+ "skills"
288
+ ) ? compatibility.response.skills ?? null : void 0;
289
+ await syncSdkSkillsIfNeeded(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
  import {
255
304
  existsSync,
@@ -331,221 +380,6 @@ function writeSessions(path, sessions) {
331
380
  }
332
381
  }
333
382
 
334
- // src/cli/self-update.ts
335
- import { spawn } from "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 {
344
- return null;
345
- }
346
- }
347
- async function reportAutoUpdateEvent(input) {
348
- let apiKey = "";
349
- try {
350
- apiKey = resolveApiKeyForBaseUrl(input.baseUrl);
351
- } catch {
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/${SDK_VERSION}`,
367
- "X-Deepline-Client-Family": "sdk",
368
- "X-Deepline-CLI-Family": "sdk",
369
- "X-Deepline-CLI-Version": SDK_VERSION,
370
- "X-Deepline-SDK-Version": SDK_VERSION
371
- },
372
- body: JSON.stringify({
373
- event: input.event,
374
- current_version: input.response.current?.trim() || SDK_VERSION,
375
- target_version: input.response.latest,
376
- reason: input.response.auto_update?.reason,
377
- command: 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 {
384
- } finally {
385
- clearTimeout(timeout);
386
- }
387
- }
388
- function envTruthy(name) {
389
- const value = process.env[name]?.trim().toLowerCase();
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") || !shouldRunCliAutoUpdate() || isCiEnvironment();
394
- }
395
- function parseSemver(version) {
396
- const trimmed = version?.trim();
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: 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 = response?.latest?.trim();
423
- const current = response?.current?.trim() || 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 : runtime.execPath ?? process.execPath;
430
- const argv = runtime.argv ?? process.argv;
431
- const args = plan.kind === "python-sidecar" ? argv.slice(2) : argv.slice(1);
432
- const platform = runtime.platform ?? process.platform;
433
- const child = spawn(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(code ?? 1));
453
- });
454
- }
455
- async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configured") {
456
- const autoUpdate = response?.auto_update;
457
- if (!response || !autoUpdate?.should_auto_update || shouldSkipSelfUpdate(policy)) {
458
- return false;
459
- }
460
- if (isDowngradeAutoUpdateResponse(response)) {
461
- const target = response.latest;
462
- const current = response.current?.trim() || 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 = resolveUpdatePlan({
471
- packageSpec,
472
- requireVerifiedNpmOwnership: true,
473
- npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
474
- });
475
- if (!canAutomaticallyApplyUpdatePlan(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 runAutomaticUpdatePlan(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 ${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
- import { InvalidArgumentError } from "commander";
539
- function parseCliMaintenancePolicy(value) {
540
- if (value === "configured" || value === "off") return value;
541
- throw new InvalidArgumentError(
542
- "Maintenance policy must be configured or off."
543
- );
544
- }
545
- function resolveCliMaintenancePolicy(input) {
546
- return input.dryRun ? "off" : 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;
@@ -762,7 +596,7 @@ async function runPlayRunnerHealthCheck() {
762
596
  });
763
597
  let exitCode = 1;
764
598
  try {
765
- const { handlePlayRun } = await import("./play-LYPAXCLD.mjs");
599
+ const { handlePlayRun } = await import("./play-LL73A7EP.mjs");
766
600
  exitCode = await handlePlayRun([
767
601
  file,
768
602
  "--input",
@@ -937,6 +771,7 @@ async function runMain(ensureTransport, onAction) {
937
771
  const mainStartedAt = Date.now();
938
772
  installJsonStderrGuard();
939
773
  let rootHelpStatus = "";
774
+ const deferredMaintenance = { inlinePlay: null };
940
775
  recordCliTrace({
941
776
  phase: "cli.main_start",
942
777
  argv: process.argv.slice(2)
@@ -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;
@@ -1017,6 +859,29 @@ Exit codes:
1017
859
  if (isToolExecuteCommand) {
1018
860
  beginToolExecuteCommand();
1019
861
  }
862
+ if (isToolExecuteCommand) {
863
+ const baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
864
+ if (maintenance !== "off") flushDeferredSkillsSyncNotices(baseUrl);
865
+ recordCliTrace({
866
+ phase: "cli.sdk_compatibility_deferred_to_tool_execute",
867
+ baseUrl,
868
+ command: compatibilityCommand
869
+ });
870
+ return;
871
+ }
872
+ const playDryRun = compatibilityCommand === "plays run" && actionCommand.optsWithGlobals().dryRun === true;
873
+ if (!playDryRun && usesInlinePlayAdmission(compatibilityCommand, process.argv.slice(2))) {
874
+ if (maintenance !== "off") {
875
+ const baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
876
+ flushDeferredSkillsSyncNotices(baseUrl);
877
+ deferredMaintenance.inlinePlay = createDeferredPlayRunMaintenance({
878
+ baseUrl,
879
+ command: actionCommand,
880
+ policy: maintenance
881
+ });
882
+ }
883
+ return;
884
+ }
1020
885
  const runStartupStage = (stage, action) => isToolExecuteCommand ? runToolExecuteStage(stage, action) : Promise.resolve(action());
1021
886
  if (printStartupPhase) {
1022
887
  progress?.phase("checking sdk compatibility");
@@ -1024,14 +889,14 @@ Exit codes:
1024
889
  const startup = await runStartupStage("SDK compatibility", async () => {
1025
890
  const baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
1026
891
  if (maintenance !== "off") flushDeferredSkillsSyncNotices(baseUrl);
1027
- const shouldDeferSkillsSync = maintenance === "off" || shouldDeferSkillsSyncForCommand();
892
+ const shouldDeferSkillsSync = isToolExecuteCommand || maintenance === "off" || shouldDeferSkillsSyncForCommand();
1028
893
  const skillsVersion = shouldDeferSkillsSync ? void 0 : readSdkSkillsLocalVersion(baseUrl);
1029
- const trusted = readTrustedCleanCompatibility(
894
+ const trusted = isToolExecuteCommand ? null : readTrustedCleanCompatibility(
1030
895
  baseUrl,
1031
896
  compatibilityCommand,
1032
897
  skillsVersion
1033
898
  );
1034
- const fastDeadline = trusted === null && readFreshCleanCompatibility(
899
+ const fastDeadline = !isToolExecuteCommand && trusted === null && readFreshCleanCompatibility(
1035
900
  baseUrl,
1036
901
  compatibilityCommand,
1037
902
  skillsVersion
@@ -1058,7 +923,7 @@ Exit codes:
1058
923
  () => checkSdkCompatibility(baseUrl, {
1059
924
  command: compatibilityCommand,
1060
925
  skillsVersion,
1061
- persistCache: maintenance !== "off",
926
+ persistCache: !isToolExecuteCommand && maintenance !== "off",
1062
927
  catalog: compatibilityCatalog(actionCommand),
1063
928
  ...fastDeadline ? { timeoutMs: SDK_COMPATIBILITY_FAST_DEADLINE_MS } : {}
1064
929
  })
@@ -1084,12 +949,14 @@ Exit codes:
1084
949
  response: compatibility.response
1085
950
  };
1086
951
  }
952
+ const policy = compatibility.response;
1087
953
  const jsonOutput = isJsonOutputMode();
1088
- enforceSdkCompatibilityResponse(compatibility.response, {
1089
- quietAdvisory: jsonOutput
954
+ enforceSdkCompatibilityResponse(policy, {
955
+ quietAdvisory: jsonOutput || // The queued update already says what is about to happen.
956
+ hasDeferredAutoUpdate() || maintenance === "off" || !claimUpdateAdvisory(baseUrl)
1090
957
  });
1091
958
  const advisory = compatibility.response;
1092
- if (jsonOutput && advisory && (advisory.status === "deprecated" || advisory.status === "update_available") && !isCiEnvironment()) {
959
+ if (jsonOutput && advisory && (advisory.status === "deprecated" || advisory.status === "update_available") && !isCiEnvironment() && !hasDeferredAutoUpdate()) {
1093
960
  addJsonNotice({ code: advisory.status, message: advisory.message });
1094
961
  }
1095
962
  return {
@@ -1119,10 +986,17 @@ Exit codes:
1119
986
  }
1120
987
  });
1121
988
  const requestedCommand = process.argv[2];
989
+ const commandRegistrationStartedAt = isCliTraceEnabled() ? 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
+ recordCliTrace({
996
+ phase: "cli.command_registration",
997
+ ms: performance.now() - commandRegistrationStartedAt
998
+ });
999
+ }
1126
1000
  const { preflight, health, version } = registerDeeplineInlineCommands(program);
1127
1001
  if (isJsonOutputMode()) silenceCommanderErrorOutput(program);
1128
1002
  preflight.addHelpText(
@@ -1170,7 +1044,7 @@ Examples:
1170
1044
  return;
1171
1045
  }
1172
1046
  try {
1173
- const { httpJson, readStatusBanner, statusBannerLine } = await import("./auth-5HIIACF7.mjs");
1047
+ const { httpJson, readStatusBanner, statusBannerLine } = await import("./auth-YD6ZTMB2.mjs");
1174
1048
  const baseUrl = resolveBaseUrlOnly();
1175
1049
  const [{ status, data }, banner] = await Promise.all([
1176
1050
  httpJson("GET", `${baseUrl}/api/v2/health`, null),
@@ -1258,7 +1132,7 @@ 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 import("./auth-5HIIACF7.mjs");
1135
+ const { authStatusLine } = await import("./auth-YD6ZTMB2.mjs");
1262
1136
  rootHelpStatus = `Version: ${SDK_VERSION}
1263
1137
  ${await authStatusLine()}
1264
1138
  `;
@@ -1358,6 +1232,10 @@ ${await authStatusLine()}
1358
1232
  });
1359
1233
  } finally {
1360
1234
  finishToolExecuteCommand();
1235
+ const maintainInlinePlay = deferredMaintenance.inlinePlay;
1236
+ deferredMaintenance.inlinePlay = null;
1237
+ await maintainInlinePlay?.();
1238
+ await runDeferredAutoUpdate();
1361
1239
  }
1362
1240
  process.exitCode = process.exitCode ?? 0;
1363
1241
  }
@@ -1365,6 +1243,7 @@ async function main() {
1365
1243
  let disposeTransport;
1366
1244
  const ensureTransport = async () => {
1367
1245
  if (disposeTransport) return;
1246
+ const transportStartedAt = isCliTraceEnabled() ? performance.now() : void 0;
1368
1247
  const hasProxy = [
1369
1248
  "HTTP_PROXY",
1370
1249
  "http_proxy",
@@ -1375,15 +1254,23 @@ async function main() {
1375
1254
  const { configureCliTransport } = await import("./proxy-env-NWUIGWS3.mjs");
1376
1255
  disposeTransport = configureCliTransport();
1377
1256
  }
1257
+ if (transportStartedAt !== void 0) {
1258
+ recordCliTrace({
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
1275
  const silentFailure = takeSilentJsonFailureMessage(process.exitCode);
1389
1276
  if (silentFailure) {
@@ -1394,7 +1281,8 @@ async function main() {
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
1287
  await disposeTransport?.();
1400
1288
  }