deepline 0.3.534 → 0.3.536

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 (235) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +254 -147
  2. package/dist/bundling-sources/sdk/src/index.ts +4 -0
  3. package/dist/bundling-sources/sdk/src/plays/local-file-discovery.ts +27 -1
  4. package/dist/bundling-sources/sdk/src/plays/run-request.ts +16 -5
  5. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/types.ts +2 -23
  7. package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +26 -14
  8. package/dist/bundling-sources/shared_libs/integration-contracts/monitor-input-contract.ts +33 -8
  9. package/dist/bundling-sources/shared_libs/monitors/fleets/count-drift-alert.ts +121 -0
  10. package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +8 -0
  11. package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +14 -82
  12. package/dist/bundling-sources/shared_libs/monitors/package.json +1 -0
  13. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +4 -4
  14. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +0 -26
  15. package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +36 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +21 -31
  17. package/dist/bundling-sources/shared_libs/play-runtime/call-requeue-state-machine.ts +420 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +727 -102
  19. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +26 -0
  20. package/dist/bundling-sources/shared_libs/play-runtime/durable-retry-policy.ts +624 -0
  21. package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +12 -10
  22. package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +3 -1
  23. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +71 -2
  24. package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +60 -1
  25. package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +2 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +1 -0
  27. package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +372 -10
  28. package/dist/bundling-sources/shared_libs/play-runtime/memory-ledger.ts +15 -2
  29. package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +21 -0
  30. package/dist/bundling-sources/shared_libs/play-runtime/prebuilt-result-quality.ts +1 -1
  31. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -0
  32. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/fixture-capacity-simulator.ts +1 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/gradient2-concurrency-controller.ts +41 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-capacity-policy.ts +6 -0
  35. package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-concurrency-policy.ts +9 -0
  36. package/dist/bundling-sources/shared_libs/play-runtime/provider-no-progress.ts +6 -2
  37. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +17 -0
  38. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +2 -2
  39. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +5 -2
  40. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +63 -3
  41. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +7 -0
  42. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +31 -0
  43. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +6 -0
  44. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +26 -1
  45. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +11 -4
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +73 -18
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +169 -2
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +26 -4
  49. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +90 -49
  50. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +136 -30
  51. package/dist/bundling-sources/shared_libs/plays/launch/input-contract.ts +13 -1
  52. package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +68 -1
  53. package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +63 -13
  54. package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +57 -1
  55. package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +22 -9
  56. package/dist/cli/auth-6XQKFOLG.js +43 -0
  57. package/dist/cli/{auth-MHQYIMVX.mjs → auth-KCTCUO7P.mjs} +7 -7
  58. package/dist/cli/{billing-YQLNP4S5.js → billing-4VBGZ3CT.js} +273 -112
  59. package/dist/cli/{billing-LX2PSBJ4.mjs → billing-OOJHKLNS.mjs} +185 -24
  60. package/dist/cli/{chunk-DGKTHWWH.js → chunk-2B4IOGFD.js} +406 -382
  61. package/dist/cli/{chunk-MQORQ7WL.js → chunk-2FCSUOYN.js} +55 -55
  62. package/dist/cli/{chunk-T2N3B7IQ.js → chunk-2GJZLIKW.js} +8 -8
  63. package/dist/cli/{chunk-6IFZPEJE.mjs → chunk-2YWJS76L.mjs} +1 -1
  64. package/dist/cli/{chunk-E7TP25I2.mjs → chunk-3PCYV6ZJ.mjs} +2 -2
  65. package/dist/cli/{chunk-LGRZCHKC.js → chunk-4E5JXZ3W.js} +18 -20
  66. package/dist/cli/{chunk-R4RG4FV5.mjs → chunk-4KWD3MX2.mjs} +13 -10
  67. package/dist/cli/{chunk-SUWTLXCV.js → chunk-6BBGUQJJ.js} +67 -146
  68. package/dist/cli/{chunk-JBBJDFUJ.js → chunk-6VUGBQZQ.js} +5 -5
  69. package/dist/cli/{chunk-2P3NVX65.mjs → chunk-AB2GBOD4.mjs} +40 -27
  70. package/dist/cli/{chunk-62SOZ67Y.mjs → chunk-ANUKBZ6W.mjs} +475 -11
  71. package/dist/cli/{chunk-MG6YL4M7.mjs → chunk-BASLYGXK.mjs} +101 -77
  72. package/dist/cli/{chunk-SQWET4SL.js → chunk-BBTKAASQ.js} +2 -1
  73. package/dist/cli/{chunk-NRO3NTVO.js → chunk-CBV7AKWM.js} +5 -5
  74. package/dist/cli/{chunk-RH3YRMUY.js → chunk-CIDN5K23.js} +1 -1
  75. package/dist/cli/{chunk-QNHHZ63P.mjs → chunk-CQBIO6HW.mjs} +1 -1
  76. package/dist/cli/{chunk-2KHUFWTK.js → chunk-CQDQNZGH.js} +42 -37
  77. package/dist/cli/{chunk-UWNVFAFN.js → chunk-CWSLUNA6.js} +33 -33
  78. package/dist/cli/{chunk-5FXMEEF4.mjs → chunk-CXTW7SRW.mjs} +67 -146
  79. package/dist/cli/{chunk-O53LHONF.mjs → chunk-DA2I2M7D.mjs} +2 -2
  80. package/dist/cli/{chunk-EYXUAJAU.mjs → chunk-DQHUJMCL.mjs} +5 -5
  81. package/dist/cli/{chunk-7GFR5Y4J.mjs → chunk-DUYAMLOC.mjs} +1 -1
  82. package/dist/cli/{chunk-OMVVHX4U.mjs → chunk-E24UGPGG.mjs} +13 -15
  83. package/dist/cli/{chunk-STR5LXK4.mjs → chunk-FSIVF2SI.mjs} +1 -1
  84. package/dist/cli/{chunk-KJVY7V2X.mjs → chunk-GF32SBST.mjs} +1 -1
  85. package/dist/cli/{chunk-AK622KIG.mjs → chunk-GHLDCLSC.mjs} +1 -1
  86. package/dist/cli/{chunk-A6HNT4EE.js → chunk-GTVZKY3F.js} +2 -2
  87. package/dist/cli/{chunk-BXIUZM5N.mjs → chunk-HAJQGP5V.mjs} +2 -2
  88. package/dist/cli/{chunk-6CEUQYMB.js → chunk-HWDKRN7L.js} +3 -3
  89. package/dist/cli/{chunk-5YAJGRWB.js → chunk-IPVRMYWT.js} +7 -7
  90. package/dist/cli/{chunk-ZPGGW27Q.mjs → chunk-JL2OTMSG.mjs} +1 -0
  91. package/dist/cli/{chunk-WR4WETRU.mjs → chunk-JUHDJNSI.mjs} +4 -4
  92. package/dist/cli/{chunk-TQH3533L.mjs → chunk-KPQHUVYW.mjs} +5 -5
  93. package/dist/cli/{chunk-V7SCRUFQ.js → chunk-KWYGWO4Y.js} +9 -6
  94. package/dist/cli/{chunk-DZS4JC7I.js → chunk-LDGZFDUB.js} +2 -2
  95. package/dist/cli/{chunk-EGTUOYYG.js → chunk-LN6RXDTB.js} +523 -59
  96. package/dist/cli/{chunk-DQ5ADV2J.mjs → chunk-LZXZQPA2.mjs} +4 -1
  97. package/dist/cli/{chunk-MYSKWJMA.js → chunk-MSP4DTSD.js} +13 -13
  98. package/dist/cli/{chunk-BNH4Y35W.mjs → chunk-OLH2PHMC.mjs} +2 -2
  99. package/dist/cli/{chunk-NNAE7E23.mjs → chunk-OUDTOMZC.mjs} +7 -9
  100. package/dist/cli/{chunk-GESIFFQX.mjs → chunk-OVX3Q5Q3.mjs} +1 -1
  101. package/dist/cli/{chunk-ENCA6O2D.mjs → chunk-PNY3BWHP.mjs} +2 -2
  102. package/dist/cli/{chunk-KSA2XE4T.js → chunk-Q4MNUOS4.js} +316 -303
  103. package/dist/cli/{chunk-GTXSUPCJ.js → chunk-Q5CXV3E3.js} +2 -2
  104. package/dist/cli/{chunk-VAG5YKP6.mjs → chunk-RVSSQPQO.mjs} +1 -1
  105. package/dist/cli/{chunk-VE7ZPLN2.js → chunk-SLPJ3LXI.js} +22 -22
  106. package/dist/cli/{chunk-IX45S5VC.js → chunk-TX5TUHJN.js} +17 -19
  107. package/dist/cli/{chunk-IF75RD6U.js → chunk-U2LVWCTD.js} +18 -6
  108. package/dist/cli/{chunk-ZS2WHWWL.js → chunk-UNDLNT3V.js} +1 -1
  109. package/dist/cli/{chunk-NDFNBJGL.js → chunk-VBDZIMWD.js} +26 -26
  110. package/dist/cli/{chunk-GVGQ6NZW.js → chunk-W7AEIGZR.js} +41 -41
  111. package/dist/cli/{chunk-WDNRPZED.mjs → chunk-WC5M3JXE.mjs} +2 -2
  112. package/dist/cli/{chunk-C374C22Y.js → chunk-WOQO3GV4.js} +14 -11
  113. package/dist/cli/{chunk-MQX363YF.js → chunk-XBAH3TKU.js} +5 -5
  114. package/dist/cli/{chunk-BDWZBMGV.mjs → chunk-XJD2GYUP.mjs} +5 -5
  115. package/dist/cli/{chunk-XRZJKHUA.mjs → chunk-XVZRJJDS.mjs} +4 -4
  116. package/dist/cli/{chunk-TVINIDHB.js → chunk-Y2NTPYGS.js} +17 -17
  117. package/dist/cli/{chunk-6GTGWZJG.mjs → chunk-YBMHOH6H.mjs} +4 -4
  118. package/dist/cli/{chunk-TG2UB3A5.mjs → chunk-YRLAUGQY.mjs} +3 -3
  119. package/dist/cli/{chunk-FKD3KL5Q.mjs → chunk-Z2XA6YU4.mjs} +10 -5
  120. package/dist/cli/{chunk-KXQCUX3X.mjs → chunk-Z7UIOGW4.mjs} +3 -3
  121. package/dist/cli/{chunk-HCD36BP6.js → chunk-ZEV2Y56V.js} +44 -44
  122. package/dist/cli/{chunk-MI6ZP7XI.mjs → chunk-ZG7BOECV.mjs} +18 -6
  123. package/dist/cli/{chunk-XBK6WCVA.js → chunk-ZILSRDIN.js} +8 -8
  124. package/dist/cli/{chunk-B2AS3R5W.js → chunk-ZISEH7OL.js} +16 -16
  125. package/dist/cli/{chunk-HPJAE6PP.js → chunk-ZZ4MF2GI.js} +6 -6
  126. package/dist/cli/command-docs.js +2 -2
  127. package/dist/cli/command-docs.mjs +1 -1
  128. package/dist/cli/{csv-U3M2G76R.js → csv-2V2DIFNG.js} +15 -15
  129. package/dist/cli/{csv-4ID4E5W3.mjs → csv-P3HLK4GO.mjs} +6 -6
  130. package/dist/cli/{db-IHAQIKEQ.js → db-MREAQVW6.js} +36 -36
  131. package/dist/cli/{db-LHX5BBCZ.mjs → db-ZYOY3QRQ.mjs} +9 -9
  132. package/dist/cli/describe-IKZFOADR.mjs +49 -0
  133. package/dist/cli/describe-WW3OQRLP.js +49 -0
  134. package/dist/cli/describe-core.d.mts +3 -3
  135. package/dist/cli/describe-core.d.ts +3 -3
  136. package/dist/cli/describe-core.js +5 -5
  137. package/dist/cli/describe-core.mjs +4 -4
  138. package/dist/cli/{executions-CJ5LV23G.js → executions-H5IJ7QSQ.js} +11 -11
  139. package/dist/cli/{executions-UJ6JZUL5.mjs → executions-KTSY5M34.mjs} +9 -9
  140. package/dist/cli/{feedback-TGUBVGRP.js → feedback-724QK3Z5.js} +16 -16
  141. package/dist/cli/{feedback-YGTPJBRJ.mjs → feedback-WWJRIXEU.mjs} +8 -8
  142. package/dist/cli/git-PHYRD56H.js +25 -0
  143. package/dist/cli/{git-3DOTQHJO.mjs → git-R5VRG7X6.mjs} +7 -7
  144. package/dist/cli/index.js +151 -157
  145. package/dist/cli/index.mjs +51 -57
  146. package/dist/cli/{legacy-noops-BHEHVFHI.js → legacy-noops-C6GDEGPU.js} +11 -11
  147. package/dist/cli/{legacy-noops-RBBYRVLG.mjs → legacy-noops-PWZ5XLAO.mjs} +8 -8
  148. package/dist/cli/{monitors-XECKLAXA.js → monitors-VAVQ4WCE.js} +125 -122
  149. package/dist/cli/{monitors-5AJCG6IV.mjs → monitors-WQSKMHAP.mjs} +19 -16
  150. package/dist/cli/{org-DOBAIYWG.js → org-CWWRWXZQ.js} +89 -89
  151. package/dist/cli/{org-ZAAIEZKB.mjs → org-MAL4QPVF.mjs} +9 -9
  152. package/dist/cli/{play-KLYRMQPF.mjs → play-ILW6MSNG.mjs} +174 -80
  153. package/dist/cli/{play-E74VN6B7.js → play-WJOWK5PQ.js} +690 -596
  154. package/dist/cli/{providers-XTQXV5LB.mjs → providers-4V2NMLZZ.mjs} +9 -9
  155. package/dist/cli/{providers-APZ6SOSK.js → providers-W662ANCH.js} +12 -12
  156. package/dist/cli/{quickstart-S6WN6NWW.js → quickstart-BW6EBUYX.js} +8 -8
  157. package/dist/cli/{quickstart-X7RHHQCH.mjs → quickstart-C22BR743.mjs} +6 -6
  158. package/dist/cli/{run-3YLIJJ57.js → run-KW7KW4FX.js} +50 -53
  159. package/dist/cli/{run-TZPBBSPX.mjs → run-SPAU5IMW.mjs} +31 -34
  160. package/dist/cli/search-HLE54W5G.js +32 -0
  161. package/dist/cli/{search-VLHE2CMZ.mjs → search-XPC75HLM.mjs} +10 -11
  162. package/dist/cli/{search-output-73BYB7UE.mjs → search-output-JKYJSEPM.mjs} +6 -6
  163. package/dist/cli/{search-output-GCT7PQIT.js → search-output-VJYE7USJ.js} +8 -8
  164. package/dist/cli/{secrets-RLOTGKQZ.mjs → secrets-OJG73GXQ.mjs} +9 -9
  165. package/dist/cli/{secrets-J6CEKXKQ.js → secrets-YB57KGSB.js} +18 -18
  166. package/dist/cli/{sessions-7HZ7OZ62.mjs → sessions-7ZL37BW4.mjs} +8 -8
  167. package/dist/cli/sessions-VEBYZIEU.js +22 -0
  168. package/dist/cli/{settings-WRV5XEZC.js → settings-A7DD2ZYE.js} +88 -89
  169. package/dist/cli/{settings-72K5YCIS.mjs → settings-RKSQB7FA.mjs} +15 -16
  170. package/dist/cli/{setup-KQFY6WT4.mjs → setup-NXDUTITY.mjs} +11 -12
  171. package/dist/cli/{setup-QVXWT2EQ.js → setup-S3K5YU62.js} +51 -52
  172. package/dist/cli/skills-NVQ744CN.js +36 -0
  173. package/dist/cli/{skills-C3K3E473.mjs → skills-VMFAIDO6.mjs} +9 -10
  174. package/dist/cli/{tools-4A2OH6MB.mjs → tools-52NTHBSJ.mjs} +20 -21
  175. package/dist/cli/tools-SBDUL3WB.js +56 -0
  176. package/dist/cli/update-HHVFZPCV.js +34 -0
  177. package/dist/cli/{update-BS6USKPR.mjs → update-SAKBEKMV.mjs} +11 -12
  178. package/dist/cli/{views-WB6GFTRX.mjs → views-ACRV7MD6.mjs} +54 -10
  179. package/dist/cli/{views-4NZGAXHL.js → views-C3GJOBDG.js} +66 -22
  180. package/dist/cli/{workflow-2D4WX55R.mjs → workflow-CS22E7TC.mjs} +10 -10
  181. package/dist/cli/{workflow-L2QTQZYV.js → workflow-ZNWCZEGN.js} +20 -20
  182. package/dist/{client-DoUVSkqC.d.mts → client-BlLYQDNo.d.mts} +1 -1
  183. package/dist/{client-DQm56zMs.d.ts → client-DSQlkIDO.d.ts} +1 -1
  184. package/dist/{client-core-C7KkUIE_.d.ts → client-core-CDwapXy5.d.ts} +167 -108
  185. package/dist/{client-core-CPlwsC1Q.d.mts → client-core-rX7n2H8U.d.mts} +167 -108
  186. package/dist/{compiler-manifest-DsxsQP-T.d.mts → compiler-manifest-BHNC4RL-.d.mts} +58 -21
  187. package/dist/{compiler-manifest-DsxsQP-T.d.ts → compiler-manifest-BHNC4RL-.d.ts} +58 -21
  188. package/dist/{errors-qdJUVQ3g.d.mts → errors-D7sPXrvB.d.mts} +1 -1
  189. package/dist/{errors-Bk5h1D-C.d.ts → errors-lhtIWG5Z.d.ts} +1 -1
  190. package/dist/{index-bL66eHYz.d.ts → index-CQTBHXHr.d.ts} +1 -1
  191. package/dist/{index-PaupwX1B.d.mts → index-NaDZq2xf.d.mts} +1 -1
  192. package/dist/index.d.mts +7 -7
  193. package/dist/index.d.ts +7 -7
  194. package/dist/index.js +15 -15
  195. package/dist/index.mjs +11 -11
  196. package/dist/install-integrity.json +131 -132
  197. package/dist/monitor-fleet-contract.d.mts +17 -11
  198. package/dist/monitor-fleet-contract.d.ts +17 -11
  199. package/dist/monitor-fleet-contract.js +3 -3
  200. package/dist/monitor-fleet-contract.mjs +2 -2
  201. package/dist/monitor-input-contract.js +2 -2
  202. package/dist/monitor-input-contract.mjs +1 -1
  203. package/dist/plays/bundle-play-file.d.mts +3 -3
  204. package/dist/plays/bundle-play-file.d.ts +3 -3
  205. package/dist/plays/bundle-play-file.mjs +67 -3
  206. package/dist/plays/csv-data-input.js +3 -3
  207. package/dist/plays/csv-data-input.mjs +2 -2
  208. package/dist/plays/play-description.d.mts +2 -2
  209. package/dist/plays/play-description.d.ts +2 -2
  210. package/dist/plays/run-request.d.mts +2 -2
  211. package/dist/plays/run-request.d.ts +2 -2
  212. package/dist/plays/run-request.js +3 -3
  213. package/dist/plays/run-request.mjs +2 -2
  214. package/dist/release.d.mts +1 -1
  215. package/dist/release.d.ts +1 -1
  216. package/dist/release.js +2 -2
  217. package/dist/release.mjs +1 -1
  218. package/dist/server.d.mts +4 -4
  219. package/dist/server.d.ts +4 -4
  220. package/dist/server.js +12 -12
  221. package/dist/server.mjs +6 -6
  222. package/package.json +1 -1
  223. package/dist/cli/auth-UP2RGPI6.js +0 -43
  224. package/dist/cli/chunk-5LZ5VSOK.mjs +0 -405
  225. package/dist/cli/chunk-D3J2Y2BP.js +0 -405
  226. package/dist/cli/describe-CI4MREFF.mjs +0 -50
  227. package/dist/cli/describe-IVTSD7ST.js +0 -50
  228. package/dist/cli/git-R3W25XIF.js +0 -25
  229. package/dist/cli/pages-FUOSF6BE.mjs +0 -266
  230. package/dist/cli/pages-TLC2N6L7.js +0 -266
  231. package/dist/cli/search-NB5CBALV.js +0 -33
  232. package/dist/cli/sessions-SFCZSB77.js +0 -22
  233. package/dist/cli/skills-WIJEHVLA.js +0 -37
  234. package/dist/cli/tools-VMMERMLO.js +0 -57
  235. package/dist/cli/update-54WZQDTS.js +0 -35
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkTVINIDHBjs = require('./chunk-TVINIDHB.js');
8
+ var _chunkY2NTPYGSjs = require('./chunk-Y2NTPYGS.js');
9
9
 
10
10
 
11
11
 
@@ -18,15 +18,15 @@ var _chunkTVINIDHBjs = require('./chunk-TVINIDHB.js');
18
18
 
19
19
 
20
20
 
21
- var _chunkV7SCRUFQjs = require('./chunk-V7SCRUFQ.js');
21
+ var _chunkKWYGWO4Yjs = require('./chunk-KWYGWO4Y.js');
22
22
 
23
23
 
24
- var _chunkIX45S5VCjs = require('./chunk-IX45S5VC.js');
24
+ var _chunkTX5TUHJNjs = require('./chunk-TX5TUHJN.js');
25
25
  require('./chunk-D3BCSAN7.js');
26
26
 
27
27
 
28
28
 
29
- var _chunkNDFNBJGLjs = require('./chunk-NDFNBJGL.js');
29
+ var _chunkVBDZIMWDjs = require('./chunk-VBDZIMWD.js');
30
30
 
31
31
 
32
32
 
@@ -47,14 +47,14 @@ var _chunkKQSTV4MWjs = require('./chunk-KQSTV4MW.js');
47
47
  var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
48
48
 
49
49
 
50
- var _chunkNRO3NTVOjs = require('./chunk-NRO3NTVO.js');
50
+ var _chunkCBV7AKWMjs = require('./chunk-CBV7AKWM.js');
51
51
 
52
52
 
53
53
 
54
- var _chunkJBBJDFUJjs = require('./chunk-JBBJDFUJ.js');
54
+ var _chunk6VUGBQZQjs = require('./chunk-6VUGBQZQ.js');
55
55
 
56
56
 
57
- var _chunkMQX363YFjs = require('./chunk-MQX363YF.js');
57
+ var _chunkXBAH3TKUjs = require('./chunk-XBAH3TKU.js');
58
58
 
59
59
 
60
60
 
@@ -67,7 +67,7 @@ var _chunkMQX363YFjs = require('./chunk-MQX363YF.js');
67
67
 
68
68
 
69
69
 
70
- var _chunkDGKTHWWHjs = require('./chunk-DGKTHWWH.js');
70
+ var _chunk2B4IOGFDjs = require('./chunk-2B4IOGFD.js');
71
71
  require('./chunk-E4CABWXL.js');
72
72
 
73
73
 
@@ -82,7 +82,7 @@ require('./chunk-E4CABWXL.js');
82
82
 
83
83
 
84
84
 
85
- var _chunk2KHUFWTKjs = require('./chunk-2KHUFWTK.js');
85
+ var _chunkCQDQNZGHjs = require('./chunk-CQDQNZGH.js');
86
86
 
87
87
 
88
88
 
@@ -91,19 +91,18 @@ require('./chunk-XDVT3GOM.js');
91
91
 
92
92
 
93
93
 
94
- var _chunkHPJAE6PPjs = require('./chunk-HPJAE6PP.js');
94
+ var _chunkZZ4MF2GIjs = require('./chunk-ZZ4MF2GI.js');
95
95
 
96
96
 
97
97
 
98
98
 
99
99
 
100
- var _chunkDZS4JC7Ijs = require('./chunk-DZS4JC7I.js');
101
- require('./chunk-HCD36BP6.js');
100
+ var _chunkLDGZFDUBjs = require('./chunk-LDGZFDUB.js');
101
+ require('./chunk-ZEV2Y56V.js');
102
102
 
103
103
 
104
104
 
105
- var _chunk6CEUQYMBjs = require('./chunk-6CEUQYMB.js');
106
- require('./chunk-D3J2Y2BP.js');
105
+ var _chunkHWDKRN7Ljs = require('./chunk-HWDKRN7L.js');
107
106
 
108
107
 
109
108
  var _chunkR7J7CJPZjs = require('./chunk-R7J7CJPZ.js');
@@ -123,17 +122,17 @@ var _chunkYGCKMI5Pjs = require('./chunk-YGCKMI5P.js');
123
122
 
124
123
 
125
124
 
126
- var _chunkEGTUOYYGjs = require('./chunk-EGTUOYYG.js');
127
- require('./chunk-XBK6WCVA.js');
125
+ var _chunkLN6RXDTBjs = require('./chunk-LN6RXDTB.js');
126
+ require('./chunk-ZILSRDIN.js');
128
127
 
129
128
 
130
- var _chunkUWNVFAFNjs = require('./chunk-UWNVFAFN.js');
131
- require('./chunk-T2N3B7IQ.js');
129
+ var _chunkCWSLUNA6js = require('./chunk-CWSLUNA6.js');
130
+ require('./chunk-2GJZLIKW.js');
132
131
  require('./chunk-XNYIZMNQ.js');
133
132
 
134
133
 
135
- var _chunkSQWET4SLjs = require('./chunk-SQWET4SL.js');
136
- require('./chunk-RH3YRMUY.js');
134
+ var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
135
+ require('./chunk-CIDN5K23.js');
137
136
  require('./chunk-OG64RBAC.js');
138
137
 
139
138
 
@@ -2115,7 +2114,7 @@ function resolveField(key, command) {
2115
2114
  function printSettings(result, json, name) {
2116
2115
  result = { ...result, settings: parsePlaySettings(result.settings) };
2117
2116
  const selected = fields.filter(([key]) => !name || key === name);
2118
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
2117
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
2119
2118
  {
2120
2119
  ...result,
2121
2120
  settings: Object.fromEntries(
@@ -2159,7 +2158,7 @@ function registerPlaySettingsCommands(plays) {
2159
2158
  valueSyntax: field.cli.valueSyntax,
2160
2159
  examples: field.cli.examples
2161
2160
  }));
2162
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
2161
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
2163
2162
  {
2164
2163
  fields: descriptions,
2165
2164
  render: {
@@ -2184,7 +2183,7 @@ function registerPlaySettingsCommands(plays) {
2184
2183
  async (options, command) => {
2185
2184
  if (options.name !== void 0) resolveField(options.name, command);
2186
2185
  printSettings(
2187
- await new (0, _chunkMQX363YFjs.DeeplineClient)().getPlaySettings(options.play),
2186
+ await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getPlaySettings(options.play),
2188
2187
  options.json,
2189
2188
  options.name
2190
2189
  );
@@ -2215,7 +2214,7 @@ function registerPlaySettingsCommands(plays) {
2215
2214
  );
2216
2215
  }
2217
2216
  if (options.dryRun) {
2218
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
2217
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
2219
2218
  {
2220
2219
  dryRun: true,
2221
2220
  play,
@@ -2236,7 +2235,7 @@ function registerPlaySettingsCommands(plays) {
2236
2235
  return;
2237
2236
  }
2238
2237
  printSettings(
2239
- await new (0, _chunkMQX363YFjs.DeeplineClient)().updatePlaySettings(play, patch),
2238
+ await new (0, _chunkXBAH3TKUjs.DeeplineClient)().updatePlaySettings(play, patch),
2240
2239
  options.json
2241
2240
  );
2242
2241
  };
@@ -2262,13 +2261,13 @@ function registerPlaySettingsCommands(plays) {
2262
2261
  "--root must be person or team; --limit must be 1\u2013100.",
2263
2262
  { exitCode: 2 }
2264
2263
  );
2265
- const page = await new (0, _chunkMQX363YFjs.DeeplineClient)().listPlaySettingsPaths({
2264
+ const page = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().listPlaySettingsPaths({
2266
2265
  root: options.root,
2267
2266
  limit,
2268
2267
  cursor: options.cursor
2269
2268
  });
2270
2269
  const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
2271
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
2270
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
2272
2271
  {
2273
2272
  ...page,
2274
2273
  nextCommand,
@@ -2319,7 +2318,7 @@ function registerPlaySettingsCommands(plays) {
2319
2318
  root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _12 => _12.root]), () => ( "person")),
2320
2319
  folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.folders]), () => ( []))
2321
2320
  };
2322
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
2321
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
2323
2322
  const paths = [];
2324
2323
  let cursor;
2325
2324
  do {
@@ -2381,7 +2380,7 @@ function registerPlaySettingsCommands(plays) {
2381
2380
  moved.push(move.playName);
2382
2381
  }
2383
2382
  }
2384
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
2383
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
2385
2384
  {
2386
2385
  dryRun: Boolean(options.dryRun),
2387
2386
  from: options.from,
@@ -2509,7 +2508,7 @@ function triggerLines(view) {
2509
2508
  return lines;
2510
2509
  }
2511
2510
  function printView(view, json) {
2512
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
2511
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
2513
2512
  {
2514
2513
  ...view,
2515
2514
  render: {
@@ -2522,7 +2521,7 @@ function printView(view, json) {
2522
2521
  );
2523
2522
  }
2524
2523
  function printResult(result, json) {
2525
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
2524
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
2526
2525
  {
2527
2526
  ...result,
2528
2527
  render: {
@@ -2552,7 +2551,7 @@ async function mutate(command, options, build) {
2552
2551
  usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
2553
2552
  }
2554
2553
  if (options.dryRun) {
2555
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
2554
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
2556
2555
  {
2557
2556
  dryRun: true,
2558
2557
  play: options.play,
@@ -2571,7 +2570,7 @@ async function mutate(command, options, build) {
2571
2570
  return;
2572
2571
  }
2573
2572
  printResult(
2574
- await new (0, _chunkMQX363YFjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2573
+ await new (0, _chunkXBAH3TKUjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
2575
2574
  options.json
2576
2575
  );
2577
2576
  }
@@ -2604,7 +2603,7 @@ function registerPlayTriggerConfigCommands(plays) {
2604
2603
  }).addHelpText("after", help2);
2605
2604
  trigger.command("get").description("Show the cron and webhook triggers of a Play.").requiredOption("--play <play>", "Play to read").option("--json", "Emit JSON").addHelpText("after", help2).action(async (options) => {
2606
2605
  printView(
2607
- await new (0, _chunkMQX363YFjs.DeeplineClient)().getPlayTriggerConfig(options.play),
2606
+ await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getPlayTriggerConfig(options.play),
2608
2607
  options.json
2609
2608
  );
2610
2609
  });
@@ -2648,7 +2647,7 @@ function registerPlayTriggerConfigCommands(plays) {
2648
2647
  if (options.auth === void 0) {
2649
2648
  if (secrets.length || options.header || options.signaturePrefix)
2650
2649
  usage(setWebhook, "--secret/--header need --auth.");
2651
- const current = await new (0, _chunkMQX363YFjs.DeeplineClient)().getPlayTriggerConfig(
2650
+ const current = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getPlayTriggerConfig(
2652
2651
  options.play
2653
2652
  );
2654
2653
  return {
@@ -2725,7 +2724,7 @@ var KIND_DESCRIPTIONS = {
2725
2724
  "receipt.skipped": "Saved work result: skipped.",
2726
2725
  "runtime.event": "Other event."
2727
2726
  };
2728
- var RUN_LOGS_KIND_HELP = _chunkDGKTHWWHjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2727
+ var RUN_LOGS_KIND_HELP = _chunk2B4IOGFDjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
2729
2728
  kind,
2730
2729
  description: KIND_DESCRIPTIONS[kind]
2731
2730
  }));
@@ -2862,9 +2861,9 @@ function configureRunQueryCommandErrors(command, resource) {
2862
2861
  const args = program.args;
2863
2862
  if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
2864
2863
  error.exitCode = 2;
2865
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2866
- _chunkEGTUOYYGjs.printJsonError.call(void 0,
2867
- Object.assign(new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(error.message), {
2864
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
2865
+ _chunkLN6RXDTBjs.printJsonError.call(void 0,
2866
+ Object.assign(new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(error.message), {
2868
2867
  exitCode: 2,
2869
2868
  retryable: false
2870
2869
  })
@@ -2908,14 +2907,14 @@ function parseQuery(args, resource) {
2908
2907
  if (VALUE_FLAGS.has(flag)) {
2909
2908
  const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
2910
2909
  if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
2911
- throw new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(
2910
+ throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
2912
2911
  `${flag} requires a value. Use ${flag} <value>.`
2913
2912
  );
2914
2913
  }
2915
2914
  if (flag === "--sum") sums.push(value);
2916
2915
  else {
2917
2916
  if (values[flag] !== void 0) {
2918
- throw new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(
2917
+ throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
2919
2918
  `${flag} may only be supplied once.`
2920
2919
  );
2921
2920
  }
@@ -2929,12 +2928,12 @@ function parseQuery(args, resource) {
2929
2928
  }
2930
2929
  if (arg.startsWith("-")) {
2931
2930
  const correction = flag === "--log-level" ? "Use --level for structured severity filtering." : flag === "--out" || flag === "--failed" || flag === "--all" ? "Use this flag with a plain runs logs <run-id> text read." : "Use --step, --level, --query, --where, --count, --group-by or --fields; see runs logs --help.";
2932
- throw new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(
2931
+ throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
2933
2932
  `Unsupported query flag ${flag}. ${correction}`
2934
2933
  );
2935
2934
  }
2936
2935
  if (runId !== void 0) {
2937
- throw new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(
2936
+ throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
2938
2937
  `Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
2939
2938
  );
2940
2939
  }
@@ -2942,7 +2941,7 @@ function parseQuery(args, resource) {
2942
2941
  }
2943
2942
  if (switches.has("--fields")) {
2944
2943
  if (runId !== void 0) {
2945
- throw new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(
2944
+ throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
2946
2945
  "--fields does not use a run ID. Omit the positional run ID."
2947
2946
  );
2948
2947
  }
@@ -2955,18 +2954,18 @@ function parseQuery(args, resource) {
2955
2954
  )
2956
2955
  ];
2957
2956
  if (incompatible.length) {
2958
- throw new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(
2957
+ throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
2959
2958
  `--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
2960
2959
  );
2961
2960
  }
2962
2961
  }
2963
2962
  if (switches.has("--count") && values["--group-by"] !== void 0) {
2964
- throw new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(
2963
+ throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
2965
2964
  "--count cannot be combined with --group-by. Use --group-by for counts per group."
2966
2965
  );
2967
2966
  }
2968
2967
  if (sums.length && switches.has("--count")) {
2969
- throw new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(
2968
+ throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
2970
2969
  "--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
2971
2970
  );
2972
2971
  }
@@ -2974,7 +2973,7 @@ function parseQuery(args, resource) {
2974
2973
  if (operation === "count") {
2975
2974
  for (const flag of ["--limit", "--cursor", "--payloads"]) {
2976
2975
  if (values[flag] !== void 0 || switches.has(flag)) {
2977
- throw new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(
2976
+ throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
2978
2977
  `--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
2979
2978
  );
2980
2979
  }
@@ -3009,16 +3008,16 @@ function parseQuery(args, resource) {
3009
3008
  ];
3010
3009
  }
3011
3010
  }
3012
- const request = _chunkDGKTHWWHjs.normalizeRunEventOperationRequest.call(void 0, body);
3011
+ const request = _chunk2B4IOGFDjs.normalizeRunEventOperationRequest.call(void 0, body);
3013
3012
  const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
3014
3013
  const backend = values["--runtime-backend"];
3015
3014
  if (backend && backend !== "daytona" && backend !== "modal") {
3016
- throw new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(
3015
+ throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
3017
3016
  "--runtime-backend must be daytona or modal."
3018
3017
  );
3019
3018
  }
3020
3019
  if (backend && !namespace) {
3021
- throw new (0, _chunkDGKTHWWHjs.RunEventQueryInputError)(
3020
+ throw new (0, _chunk2B4IOGFDjs.RunEventQueryInputError)(
3022
3021
  "--runtime-backend requires --runtime-namespace."
3023
3022
  );
3024
3023
  }
@@ -3065,12 +3064,12 @@ async function handleRunEventQuery(args, resource = "logs") {
3065
3064
  const failure = error instanceof Error ? error : new Error(String(error));
3066
3065
  const record4 = failure;
3067
3066
  const status = record4.statusCode;
3068
- const exitCode = error instanceof _chunkDGKTHWWHjs.RunEventQueryInputError || status === 400 || status === 422 || record4.code === "INVALID_RUNTIME_SELECTION" ? 2 : status === 401 || status === 403 || record4.code === "CONFIG_ERROR" || record4.code === "RUNTIME_ENVIRONMENT_TOKEN_REQUIRED" ? 3 : status === 404 ? 4 : 5;
3067
+ const exitCode = error instanceof _chunk2B4IOGFDjs.RunEventQueryInputError || status === 400 || status === 422 || record4.code === "INVALID_RUNTIME_SELECTION" ? 2 : status === 401 || status === 403 || record4.code === "CONFIG_ERROR" || record4.code === "RUNTIME_ENVIRONMENT_TOKEN_REQUIRED" ? 3 : status === 404 ? 4 : 5;
3069
3068
  const diagnostic = Object.assign(failure, {
3070
3069
  exitCode,
3071
3070
  retryable: exitCode === 5
3072
3071
  });
3073
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) _chunkEGTUOYYGjs.printJsonError.call(void 0, diagnostic);
3072
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) _chunkLN6RXDTBjs.printJsonError.call(void 0, diagnostic);
3074
3073
  else console.error(`Error: ${diagnostic.message}`);
3075
3074
  return exitCode;
3076
3075
  }
@@ -3085,7 +3084,7 @@ async function executeRunEventQuery(args, resource) {
3085
3084
  ...criteria
3086
3085
  } = request;
3087
3086
  const options = { ...criteria, ...runtime ? { runtime } : {} };
3088
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
3087
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
3089
3088
  let result;
3090
3089
  if (request.operation === "fields") {
3091
3090
  result = await client.runs[resource].fields(runtime ? { runtime } : {});
@@ -3151,13 +3150,13 @@ async function executeRunEventQuery(args, resource) {
3151
3150
  lines.push(`Next page: ${nextPage}`);
3152
3151
  }
3153
3152
  }
3154
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
3153
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
3155
3154
  {
3156
3155
  ...result,
3157
3156
  ...nextPage ? { next: { page: nextPage } } : {},
3158
3157
  render: { sections: [{ title: `run ${resource}`, lines }] }
3159
3158
  },
3160
- { json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3159
+ { json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
3161
3160
  ` }
3162
3161
  );
3163
3162
  return 0;
@@ -3228,7 +3227,7 @@ function rowCountsFrom(input) {
3228
3227
  return { completed: c, failed: f, total: known };
3229
3228
  }
3230
3229
  function decodeRunStatus(status) {
3231
- return _chunk2KHUFWTKjs.decodePlayRunPublicStatus.call(void 0, status);
3230
+ return _chunkCQDQNZGHjs.decodePlayRunPublicStatus.call(void 0, status);
3232
3231
  }
3233
3232
  function deriveRunExecutionState(input) {
3234
3233
  const status = decodeRunStatus(input.status);
@@ -4119,7 +4118,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4119
4118
  ...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
4120
4119
  );
4121
4120
  }
4122
- const response = await new (0, _chunkMQX363YFjs.DeeplineClient)().runs.getReceipts(runId, {
4121
+ const response = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.getReceipts(runId, {
4123
4122
  keys
4124
4123
  });
4125
4124
  const failed = response.receipts.filter(
@@ -4131,7 +4130,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4131
4130
  JSON.stringify(response, null, 2) + "\n",
4132
4131
  { flag: "wx", mode: 384 }
4133
4132
  );
4134
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
4133
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
4135
4134
  {
4136
4135
  runId,
4137
4136
  out: options.out,
@@ -4141,7 +4140,7 @@ Existing credential redactions and referenced-list previews remain as stored.
4141
4140
  { json: true }
4142
4141
  );
4143
4142
  } else {
4144
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
4143
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
4145
4144
  }
4146
4145
  if (failed)
4147
4146
  process.exitCode = response.receipts.some(
@@ -4180,7 +4179,7 @@ includes nextCommand when another page is available.
4180
4179
  { exitCode: 2 }
4181
4180
  );
4182
4181
  }
4183
- const page = await new (0, _chunkMQX363YFjs.DeeplineClient)().runs.children(parentRunId, {
4182
+ const page = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.children(parentRunId, {
4184
4183
  launchKey: options.launchKey,
4185
4184
  ...options.cursor !== void 0 ? { cursor: options.cursor } : {},
4186
4185
  limit
@@ -4195,7 +4194,7 @@ includes nextCommand when another page is available.
4195
4194
  "--limit",
4196
4195
  String(limit)
4197
4196
  ].join(" ") : null;
4198
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
4197
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
4199
4198
  {
4200
4199
  parentRunId,
4201
4200
  launchKey: options.launchKey,
@@ -4231,7 +4230,7 @@ async function handleRunsHistory(options) {
4231
4230
  throw new Error("--limit must be a positive integer.");
4232
4231
  }
4233
4232
  }
4234
- const page = await new (0, _chunkMQX363YFjs.DeeplineClient)().runs.history({
4233
+ const page = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.history({
4235
4234
  cursor: options.cursor,
4236
4235
  orgId: options.org,
4237
4236
  search: options.search,
@@ -4247,7 +4246,7 @@ async function handleRunsHistory(options) {
4247
4246
  );
4248
4247
  }
4249
4248
  if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
4250
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
4249
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
4251
4250
  { ...page, render: { sections: [{ title: "Run history", lines }] } },
4252
4251
  options.json ? { json: true } : {}
4253
4252
  );
@@ -4300,12 +4299,12 @@ async function runRunsRerunCommand(runId, options) {
4300
4299
  }
4301
4300
  }
4302
4301
  if (options.notice) console.error(options.notice);
4303
- const result = await new (0, _chunkMQX363YFjs.DeeplineClient)().runs.rerun(runId, {
4302
+ const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.rerun(runId, {
4304
4303
  ...idempotencyKey === void 0 ? {} : { idempotencyKey },
4305
4304
  ...inputOverrides === void 0 ? {} : { inputOverrides }
4306
4305
  });
4307
- if (_chunkEGTUOYYGjs.shouldEmitJson.call(void 0, options.json)) {
4308
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, result, { json: true });
4306
+ if (_chunkLN6RXDTBjs.shouldEmitJson.call(void 0, options.json)) {
4307
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, result, { json: true });
4309
4308
  } else if (result.rateLimited) {
4310
4309
  console.log(`
4311
4310
  ${result.rateLimited.message}`);
@@ -4329,18 +4328,18 @@ Rerun started from ${runId}${inputOverrides ? " with input overrides" : ""}.`
4329
4328
  // src/cli/operations/runs-resume.ts
4330
4329
  async function runRunsResumeCommand(runId) {
4331
4330
  try {
4332
- const result = await new (0, _chunkMQX363YFjs.DeeplineClient)().runs.resume(runId);
4331
+ const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.resume(runId);
4333
4332
  if (result.runId !== runId || result.resumed !== true || !Number.isSafeInteger(result.epoch) || result.epoch < 1)
4334
4333
  throw new Error(
4335
4334
  "Invalid resume receipt: expected the requested run and a new positive epoch."
4336
4335
  );
4337
4336
  console.log(
4338
- `Resumed run ${result.runId} at epoch ${result.epoch}. Completed calls will be reused; only unfinished work runs.`
4337
+ `Resumed run ${result.runId} at epoch ${result.epoch}. Matching completed operations can be recovered; unfinished or unrecorded work can incur charges.`
4339
4338
  );
4340
4339
  console.log(` inspect: deepline runs get ${result.runId}`);
4341
4340
  return 0;
4342
4341
  } catch (error) {
4343
- if (error instanceof _chunkSQWET4SLjs.DeeplineError && error.code && !error.message.includes(error.code))
4342
+ if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code && !error.message.includes(error.code))
4344
4343
  error.message = `${error.code}: ${error.message}`;
4345
4344
  throw error;
4346
4345
  }
@@ -4368,7 +4367,7 @@ function isUnambiguousLocalFilePath(value) {
4368
4367
  const trimmed = value.trim();
4369
4368
  return nodePath.posix.isAbsolute(trimmed) || nodePath.win32.isAbsolute(trimmed) || /^\.\.?[\\/]/.test(trimmed) || trimmed.includes("\\");
4370
4369
  }
4371
- function resolveCliFileInput(value, binding, environment = hostFileInputPathEnvironment()) {
4370
+ function resolveCliFileInput(value, binding, environment = hostFileInputPathEnvironment(), packagedFiles) {
4372
4371
  if (typeof value !== "string") return null;
4373
4372
  const trimmed = value.trim();
4374
4373
  if (!trimmed || URL_VALUE.test(trimmed)) return null;
@@ -4380,13 +4379,21 @@ function resolveCliFileInput(value, binding, environment = hostFileInputPathEnvi
4380
4379
  };
4381
4380
  }
4382
4381
  if (isUnambiguousLocalFilePath(trimmed)) {
4383
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
4382
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
4384
4383
  `Input ${binding.inputPath} is a local file path that is not a readable file: ${trimmed} (resolved to ${absolutePath}). Pass a readable file path or an https:// URL. No run was created.`,
4385
4384
  void 0,
4386
4385
  "PLAY_INPUT_FILE_PREFLIGHT",
4387
4386
  { inputPath: binding.inputPath, path: trimmed, resolved: absolutePath }
4388
4387
  );
4389
4388
  }
4389
+ if (packagedFiles && !packagedFiles.has(trimmed)) {
4390
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
4391
+ `Input ${binding.inputPath} is not a readable local file, a URL, or a file packaged with the Play: ${trimmed} (resolved to ${absolutePath}). Pass a readable file path or an https:// URL. No run was created.`,
4392
+ void 0,
4393
+ "PLAY_INPUT_FILE_PREFLIGHT",
4394
+ { inputPath: binding.inputPath, path: trimmed, resolved: absolutePath }
4395
+ );
4396
+ }
4390
4397
  return null;
4391
4398
  }
4392
4399
 
@@ -4435,7 +4442,7 @@ function runTableHitCounts(tableNamespace, summary) {
4435
4442
  const columns = {};
4436
4443
  for (const column of Object.keys(_nullishCoalesce(summary.columns, () => ( {})))) {
4437
4444
  if (column.includes(".")) continue;
4438
- const physical = _chunk2KHUFWTKjs.sqlSafePlayColumnName.call(void 0, column);
4445
+ const physical = _chunkCQDQNZGHjs.sqlSafePlayColumnName.call(void 0, column);
4439
4446
  if (legColumns.has(physical)) continue;
4440
4447
  const count2 = filled[physical];
4441
4448
  if (typeof count2 === "number") columns[column] = count2;
@@ -5163,13 +5170,13 @@ var RunDataset = class _RunDataset {
5163
5170
  const absolutePath = _path.resolve.call(void 0, outPath);
5164
5171
  _fs.writeFileSync.call(void 0,
5165
5172
  absolutePath,
5166
- `${JSON.stringify(_chunkV7SCRUFQjs.orderRunExportJson.call(void 0, this.rows), null, 2)}
5173
+ `${JSON.stringify(_chunkKWYGWO4Yjs.orderRunExportJson.call(void 0, this.rows), null, 2)}
5167
5174
  `,
5168
5175
  "utf-8"
5169
5176
  );
5170
5177
  return absolutePath;
5171
5178
  }
5172
- return _chunkV7SCRUFQjs.writeRunDatasetCsv.call(void 0, {
5179
+ return _chunkKWYGWO4Yjs.writeRunDatasetCsv.call(void 0, {
5173
5180
  rows: this.rows,
5174
5181
  columns: this.#info.columns,
5175
5182
  outPath
@@ -5186,7 +5193,7 @@ function resolveDatasetByName(available, datasetPath) {
5186
5193
  function uniqueDatasetMatch(infos, selector) {
5187
5194
  const matches = distinctCanonicalRowsInfos(infos);
5188
5195
  if (matches.length > 1) {
5189
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
5196
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5190
5197
  `Dataset selector '${selector}' is ambiguous; it matches multiple identities. Choose a unique Dataset ID or path.`,
5191
5198
  void 0,
5192
5199
  "RUN_EXPORT_DATASET_AMBIGUOUS",
@@ -5279,7 +5286,7 @@ function resolveReturnedDataset(output, available) {
5279
5286
  if (legacy && (!datasetId || !legacy.datasetId)) {
5280
5287
  return datasetId ? { ...legacy, datasetId } : legacy;
5281
5288
  }
5282
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
5289
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5283
5290
  `Returned Dataset '${_nullishCoalesce(_nullishCoalesce(datasetId, () => ( path)), () => ( "unknown"))}' is missing from the run catalog; cannot choose another dataset in its place.`,
5284
5291
  void 0,
5285
5292
  "RUN_EXPORT_DATASET_NOT_FOUND",
@@ -6674,7 +6681,7 @@ function renderOutcome(outcome) {
6674
6681
  function printResult2(input) {
6675
6682
  const failed = input.status === "failed" || input.status === "cancelled";
6676
6683
  if (failed) process.exitCode = 1;
6677
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
6684
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
6678
6685
  {
6679
6686
  deployment: { ...input.deployment, status: input.status },
6680
6687
  plays: input.outcomes,
@@ -6699,7 +6706,7 @@ async function handlePlaysDeploy(directory, options) {
6699
6706
  const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
6700
6707
  throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
6701
6708
  });
6702
- const { http, config } = _chunkEGTUOYYGjs.getAuthedHttpClient.call(void 0, );
6709
+ const { http, config } = _chunkLN6RXDTBjs.getAuthedHttpClient.call(void 0, );
6703
6710
  const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
6704
6711
  const startDeployment = () => http.post("/api/v2/deployments", {
6705
6712
  deliveryId,
@@ -6726,7 +6733,7 @@ async function handlePlaysDeploy(directory, options) {
6726
6733
  },
6727
6734
  {
6728
6735
  bundle: bundleDeployPlayFile,
6729
- fetchImpl: _chunkUWNVFAFNjs.fetchWithDeploymentProtection,
6736
+ fetchImpl: _chunkCWSLUNA6js.fetchWithDeploymentProtection,
6730
6737
  // The plays are already here: "opening" the source is naming it.
6731
6738
  openSource: async () => ({
6732
6739
  open: async () => ({ repoRoot: root })
@@ -6852,7 +6859,7 @@ async function checkLocalPlayGraph(input) {
6852
6859
  // src/cli/renderers/local-play-execution.ts
6853
6860
  function renderLocalPlayExecutionPlan(plan, options = {}) {
6854
6861
  if (options.dryRun) {
6855
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
6862
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
6856
6863
  return;
6857
6864
  }
6858
6865
  process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
@@ -7024,7 +7031,7 @@ function traceCliSync(phase, fields2, run) {
7024
7031
  const startedAt = Date.now();
7025
7032
  try {
7026
7033
  const result = run();
7027
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
7034
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
7028
7035
  phase,
7029
7036
  ms: Date.now() - startedAt,
7030
7037
  ok: true,
@@ -7032,7 +7039,7 @@ function traceCliSync(phase, fields2, run) {
7032
7039
  });
7033
7040
  return result;
7034
7041
  } catch (error) {
7035
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
7042
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
7036
7043
  phase,
7037
7044
  ms: Date.now() - startedAt,
7038
7045
  ok: false,
@@ -7085,10 +7092,10 @@ function buildBarePrebuiltReferenceError(input) {
7085
7092
  return new Error(buildBarePrebuiltReferenceMessage(input));
7086
7093
  }
7087
7094
  function isPlayNotFoundError(error) {
7088
- return error instanceof _chunkSQWET4SLjs.DeeplineError && (error.statusCode === 404 || error.code === "PLAY_NOT_FOUND" || error.code === "NOT_FOUND");
7095
+ return error instanceof _chunkBBTKAASQjs.DeeplineError && (error.statusCode === 404 || error.code === "PLAY_NOT_FOUND" || error.code === "NOT_FOUND");
7089
7096
  }
7090
7097
  function isExplicitMissingPlayReferenceError(error) {
7091
- if (!(error instanceof _chunkSQWET4SLjs.DeeplineError)) {
7098
+ if (!(error instanceof _chunkBBTKAASQjs.DeeplineError)) {
7092
7099
  return false;
7093
7100
  }
7094
7101
  if (error.statusCode !== 404 && error.code !== "PLAY_NOT_FOUND") {
@@ -7216,7 +7223,7 @@ function buildPlayReferenceNotFoundMessage(input) {
7216
7223
  lines.push(
7217
7224
  "",
7218
7225
  "Search visible plays:",
7219
- ` deepline search --type plays ${_chunkAID3OYVJjs.shellQuote.call(void 0, searchQuery)}`
7226
+ ` deepline search ${_chunkAID3OYVJjs.shellQuote.call(void 0, searchQuery)}`
7220
7227
  );
7221
7228
  }
7222
7229
  return lines.join("\n");
@@ -7239,9 +7246,9 @@ async function buildPlayReferenceNotFoundError(input) {
7239
7246
  } catch (e8) {
7240
7247
  suggestions = [];
7241
7248
  }
7242
- const sourceError = input.sourceError instanceof _chunkSQWET4SLjs.DeeplineError ? input.sourceError : null;
7249
+ const sourceError = input.sourceError instanceof _chunkBBTKAASQjs.DeeplineError ? input.sourceError : null;
7243
7250
  const code = _optionalChain([sourceError, 'optionalAccess', _251 => _251.code]) && sourceError.code !== "API_ERROR" ? sourceError.code : "PLAY_NOT_FOUND";
7244
- return new (0, _chunkSQWET4SLjs.DeeplineError)(
7251
+ return new (0, _chunkBBTKAASQjs.DeeplineError)(
7245
7252
  buildPlayReferenceNotFoundMessage({
7246
7253
  requested: input.target,
7247
7254
  command: input.command,
@@ -7256,7 +7263,7 @@ async function isMissingRunPlayReferenceError(input) {
7256
7263
  if (isExplicitMissingPlayReferenceError(input.error)) {
7257
7264
  return true;
7258
7265
  }
7259
- if (!(input.error instanceof _chunkSQWET4SLjs.DeeplineError) || input.error.statusCode !== 404 || !/^no artifact-backed revision found for play:/i.test(
7266
+ if (!(input.error instanceof _chunkBBTKAASQjs.DeeplineError) || input.error.statusCode !== 404 || !/^no artifact-backed revision found for play:/i.test(
7260
7267
  input.error.message.trim()
7261
7268
  )) {
7262
7269
  return false;
@@ -7494,6 +7501,15 @@ function sourceGraphMentionsRunPlay(node) {
7494
7501
  (source) => runPlayCallPattern.test(source)
7495
7502
  );
7496
7503
  }
7504
+ function mayBindBareFileName(node, runtimeInput) {
7505
+ const declaresCsvInput = [
7506
+ node.sourceCode,
7507
+ ...Object.values(node.sourceFiles)
7508
+ ].some((source) => /\bCsvInput\b/.test(source));
7509
+ return declaresCsvInput && Object.values(runtimeInput).some(
7510
+ (value) => typeof value === "string" && value.trim() !== "" && !isUrlValue(value)
7511
+ );
7512
+ }
7497
7513
  function isUrlValue(value) {
7498
7514
  return /^[a-z][a-z0-9+.-]*:\/\//i.test(value.trim());
7499
7515
  }
@@ -7510,7 +7526,7 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
7510
7526
  if (!trimmed || isUrlValue(trimmed)) {
7511
7527
  return;
7512
7528
  }
7513
- const keyIsCsvData = key === _chunk2KHUFWTKjs.CSV_DATA_INPUT_KEY;
7529
+ const keyIsCsvData = key === _chunkCQDQNZGHjs.CSV_DATA_INPUT_KEY;
7514
7530
  const endsWithCsv = /\.csv$/i.test(trimmed);
7515
7531
  const looksLikeFile = /\.[a-z0-9]{1,8}$/i.test(trimmed);
7516
7532
  if (keyIsCsvData) {
@@ -7541,14 +7557,14 @@ function collectLocalFileInputRefs(value, inputPath, key, out) {
7541
7557
  }
7542
7558
  }
7543
7559
  function preflightLocalFileInputs(runtimeInput) {
7544
- if (_chunk2KHUFWTKjs.CSV_DATA_INPUT_KEY in runtimeInput) {
7545
- const csvValue = runtimeInput[_chunk2KHUFWTKjs.CSV_DATA_INPUT_KEY];
7560
+ if (_chunkCQDQNZGHjs.CSV_DATA_INPUT_KEY in runtimeInput) {
7561
+ const csvValue = runtimeInput[_chunkCQDQNZGHjs.CSV_DATA_INPUT_KEY];
7546
7562
  if (typeof csvValue === "string" && csvValue.trim().length === 0) {
7547
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
7548
- `Input ${_chunk2KHUFWTKjs.CSV_DATA_INPUT_KEY} is an empty string. Provide a path to a CSV file (or a CSV URL). No run was created.`,
7563
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
7564
+ `Input ${_chunkCQDQNZGHjs.CSV_DATA_INPUT_KEY} is an empty string. Provide a path to a CSV file (or a CSV URL). No run was created.`,
7549
7565
  void 0,
7550
7566
  "PLAY_INPUT_FILE_PREFLIGHT",
7551
- { inputPath: _chunk2KHUFWTKjs.CSV_DATA_INPUT_KEY, reason: "csv_empty_string" }
7567
+ { inputPath: _chunkCQDQNZGHjs.CSV_DATA_INPUT_KEY, reason: "csv_empty_string" }
7552
7568
  );
7553
7569
  }
7554
7570
  }
@@ -7559,7 +7575,7 @@ function preflightLocalFileInputs(runtimeInput) {
7559
7575
  for (const ref of refs) {
7560
7576
  const absolutePath = _path.resolve.call(void 0, ref.value);
7561
7577
  if (!_fs.existsSync.call(void 0, absolutePath)) {
7562
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
7578
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
7563
7579
  `Input ${ref.inputPath} references a local file that does not exist: ${ref.value} (resolved to ${absolutePath}). No run was created.`,
7564
7580
  void 0,
7565
7581
  "PLAY_INPUT_FILE_PREFLIGHT",
@@ -7570,7 +7586,7 @@ function preflightLocalFileInputs(runtimeInput) {
7570
7586
  try {
7571
7587
  stat2 = _fs.statSync.call(void 0, absolutePath);
7572
7588
  } catch (error) {
7573
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
7589
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
7574
7590
  `Input ${ref.inputPath} references a local file that is not readable: ${ref.value} (${error instanceof Error ? error.message : String(error)}). No run was created.`,
7575
7591
  void 0,
7576
7592
  "PLAY_INPUT_FILE_PREFLIGHT",
@@ -7578,7 +7594,7 @@ function preflightLocalFileInputs(runtimeInput) {
7578
7594
  );
7579
7595
  }
7580
7596
  if (!stat2.isFile()) {
7581
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
7597
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
7582
7598
  `Input ${ref.inputPath} references ${ref.value}, which is not a file. No run was created.`,
7583
7599
  void 0,
7584
7600
  "PLAY_INPUT_FILE_PREFLIGHT",
@@ -7596,14 +7612,14 @@ function preflightCsvDataInput(ref, absolutePath) {
7596
7612
  try {
7597
7613
  content = _fs.readFileSync.call(void 0, absolutePath, "utf-8");
7598
7614
  } catch (error) {
7599
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
7615
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
7600
7616
  `Input ${ref.inputPath} CSV ${ref.value} is not readable: ${error instanceof Error ? error.message : String(error)}. No run was created.`,
7601
7617
  void 0,
7602
7618
  "PLAY_INPUT_FILE_PREFLIGHT",
7603
7619
  { inputPath: ref.inputPath, path: ref.value }
7604
7620
  );
7605
7621
  }
7606
- _chunkNRO3NTVOjs.parseCsvDataInput.call(void 0, { inputPath: ref.inputPath, value: ref.value }, content);
7622
+ _chunkCBV7AKWMjs.parseCsvDataInput.call(void 0, { inputPath: ref.inputPath, value: ref.value }, content);
7607
7623
  }
7608
7624
  function namedRunNeedsPlayDefinition(input) {
7609
7625
  return input.revisionSelector === "latest" || inputContainsLocalFilePath(input.runtimeInput);
@@ -7615,12 +7631,17 @@ var NODE_STAGED_FILE_CODEC = {
7615
7631
  )
7616
7632
  };
7617
7633
  async function stageFileInputArgs(input) {
7618
- return _chunk2KHUFWTKjs.stageFileInputs.call(void 0, {
7634
+ return _chunkCQDQNZGHjs.stageFileInputs.call(void 0, {
7619
7635
  stage: (files) => input.client.stagePlayFiles(files),
7620
7636
  runtimeInput: input.runtimeInput,
7621
7637
  bindings: input.bindings,
7622
7638
  codec: NODE_STAGED_FILE_CODEC,
7623
- resolveLocalFile: (value, binding) => resolveCliFileInput(value, binding),
7639
+ resolveLocalFile: (value, binding) => resolveCliFileInput(
7640
+ value,
7641
+ binding,
7642
+ hostFileInputPathEnvironment(),
7643
+ input.packagedFiles
7644
+ ),
7624
7645
  onStaging: (fileCount) => input.progress.phase(
7625
7646
  fileCount === 1 ? "staging input file" : "staging input files"
7626
7647
  )
@@ -7632,7 +7653,7 @@ function stageFile(logicalPath, absolutePath) {
7632
7653
  logicalPath,
7633
7654
  contentBase64: buffer.toString("base64"),
7634
7655
  contentHash: _crypto.createHash.call(void 0, "sha256").update(buffer).digest("hex"),
7635
- contentType: _chunk2KHUFWTKjs.stagedFileContentType.call(void 0, absolutePath),
7656
+ contentType: _chunkCQDQNZGHjs.stagedFileContentType.call(void 0, absolutePath),
7636
7657
  bytes: buffer.byteLength
7637
7658
  };
7638
7659
  }
@@ -7831,10 +7852,10 @@ function playStatusErrorText(status) {
7831
7852
  function isRetryablePendingStartFailure(status) {
7832
7853
  if (status.status !== "failed") return false;
7833
7854
  if (status.runId && status.runId !== "pending") return false;
7834
- return _chunkDGKTHWWHjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
7855
+ return _chunk2B4IOGFDjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
7835
7856
  }
7836
7857
  function isAmbiguousPlayStartOutcomeError(error) {
7837
- if (error instanceof _chunkSQWET4SLjs.DeeplineError && typeof error.statusCode === "number") {
7858
+ if (error instanceof _chunkBBTKAASQjs.DeeplineError && typeof error.statusCode === "number") {
7838
7859
  return error.statusCode >= 500;
7839
7860
  }
7840
7861
  return true;
@@ -7857,14 +7878,14 @@ var RetryablePlayStartAttemptError = class extends Error {
7857
7878
  this.name = "RetryablePlayStartAttemptError";
7858
7879
  }
7859
7880
  };
7860
- var PlayStartOutcomeUnknownError = (_class = class extends _chunkSQWET4SLjs.DeeplineError {
7881
+ var PlayStartOutcomeUnknownError = (_class = class extends _chunkBBTKAASQjs.DeeplineError {
7861
7882
  __init() {this.retryable = false}
7862
7883
  constructor(playName, cause, workflowId) {
7863
7884
  const causeMessage = cause instanceof Error ? cause.message : String(cause);
7864
7885
  const recoveryCommand = workflowId ? `deepline runs get ${_chunkAID3OYVJjs.shellQuote.call(void 0, workflowId)} --json` : `deepline runs list --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)} --json`;
7865
7886
  super(
7866
7887
  `Play ${playName}${workflowId ? ` (${workflowId})` : ""} may have started, but the CLI did not receive confirmation. Do not run it again until you inspect the original workspace with: ${recoveryCommand}`,
7867
- cause instanceof _chunkSQWET4SLjs.DeeplineError ? cause.statusCode : void 0,
7888
+ cause instanceof _chunkBBTKAASQjs.DeeplineError ? cause.statusCode : void 0,
7868
7889
  "PLAY_START_OUTCOME_UNKNOWN",
7869
7890
  {
7870
7891
  outcome: "unknown",
@@ -7881,13 +7902,13 @@ var PlayStartOutcomeUnknownError = (_class = class extends _chunkSQWET4SLjs.Deep
7881
7902
  }, _class);
7882
7903
  function watchSurfaceReaches(state, provenance, level) {
7883
7904
  const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
7884
- if (!_chunkDGKTHWWHjs.logLevelReaches.call(void 0, level, minimumLevel)) {
7905
+ if (!_chunk2B4IOGFDjs.logLevelReaches.call(void 0, level, minimumLevel)) {
7885
7906
  return false;
7886
7907
  }
7887
- if (_chunkDGKTHWWHjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
7908
+ if (_chunk2B4IOGFDjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
7888
7909
  return true;
7889
7910
  }
7890
- return state.verbose === true && _chunkDGKTHWWHjs.logProvenanceReaches.call(void 0, provenance, "debug");
7911
+ return state.verbose === true && _chunk2B4IOGFDjs.logProvenanceReaches.call(void 0, provenance, "debug");
7891
7912
  }
7892
7913
  function getEventPayload(event) {
7893
7914
  return event.payload && typeof event.payload === "object" ? event.payload : {};
@@ -8397,7 +8418,7 @@ function resolvePlayRunUrl(input) {
8397
8418
  }
8398
8419
  function openPlayDashboard(url, open2) {
8399
8420
  if (open2 && url) {
8400
- _chunkEGTUOYYGjs.openInBrowser.call(void 0, url);
8421
+ _chunkLN6RXDTBjs.openInBrowser.call(void 0, url);
8401
8422
  }
8402
8423
  }
8403
8424
  function printPlayLogLines(input) {
@@ -8414,7 +8435,7 @@ function assertPlayWaitNotTimedOut(input) {
8414
8435
  const hasRealRunId = input.workflowId.length > 0 && input.workflowId !== "pending";
8415
8436
  const phaseSuffix = input.lastPhase && input.lastPhase.trim() ? ` (last observed phase: ${input.lastPhase.trim()})` : "";
8416
8437
  const tailHint = hasRealRunId ? ` The CLI stopped waiting; it did not cancel the run. Check its current state with 'deepline runs get ${input.workflowId}', or reattach with 'deepline runs watch ${input.workflowId}'. Do not start another run just to retrieve results.` : ` No run id was received, so acceptance is unknown. Check recent runs with 'deepline runs list --play <play-name>' before submitting again.`;
8417
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
8438
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
8418
8439
  `Timed out waiting for play ${hasRealRunId ? input.workflowId : "<no run id>"} after ${Math.ceil(input.waitTimeoutMs / 1e3)}s${phaseSuffix}.${tailHint}`,
8419
8440
  void 0,
8420
8441
  "PLAY_WAIT_TIMEOUT",
@@ -8429,7 +8450,7 @@ function assertPlayWaitNotTimedOut(input) {
8429
8450
  var RUN_WATCH_RETRY_INTERVAL_MS = 2e3;
8430
8451
  var RUN_WATCH_ADMISSION_VISIBILITY_RETRY_INTERVAL_MS = 500;
8431
8452
  function isAdmittedRunVisibilityDelay(error) {
8432
- return error instanceof _chunkSQWET4SLjs.DeeplineError && error.statusCode === 404 && error.message.trim() === "Workflow run not found.";
8453
+ return error instanceof _chunkBBTKAASQjs.DeeplineError && error.statusCode === 404 && error.message.trim() === "Workflow run not found.";
8433
8454
  }
8434
8455
  async function waitForPlayCompletionByWatch(input) {
8435
8456
  let lastPhase = null;
@@ -8478,7 +8499,7 @@ async function waitForPlayCompletionByWatch(input) {
8478
8499
  ...input.fullJson === void 0 ? {} : { full: input.fullJson }
8479
8500
  });
8480
8501
  } catch (error) {
8481
- if (_chunkDGKTHWWHjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
8502
+ if (_chunk2B4IOGFDjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
8482
8503
  return null;
8483
8504
  }
8484
8505
  throw error;
@@ -8559,9 +8580,9 @@ async function waitForPlayCompletionByWatch(input) {
8559
8580
  signal: controller.signal,
8560
8581
  deferLogs: !input.emitLogs,
8561
8582
  omitTerminalLogs: !input.emitLogs,
8562
- ..._chunkDZS4JC7Ijs.isCliTraceEnabled.call(void 0, ) ? {
8583
+ ..._chunkLDGZFDUBjs.isCliTraceEnabled.call(void 0, ) ? {
8563
8584
  onPoll: (observation) => {
8564
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
8585
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
8565
8586
  phase: "play_watch_poll",
8566
8587
  workflowId: input.workflowId,
8567
8588
  ms: observation.durationMs,
@@ -8575,7 +8596,7 @@ async function waitForPlayCompletionByWatch(input) {
8575
8596
  full: input.fullJson,
8576
8597
  billing: false,
8577
8598
  onStatus: async (status) => {
8578
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
8599
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
8579
8600
  phase: "play_watch_terminal_status",
8580
8601
  workflowId: input.workflowId,
8581
8602
  full: input.fullJson === true
@@ -8616,7 +8637,7 @@ async function waitForPlayCompletionByWatch(input) {
8616
8637
  const terminal = await fetchTerminalStatus();
8617
8638
  if (terminal) return terminal;
8618
8639
  assertPlayWaitNotTimedOut({ ...input, lastPhase });
8619
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
8640
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
8620
8641
  `Run watch for ${input.workflowId} ended before a terminal status.`,
8621
8642
  void 0,
8622
8643
  "PLAY_WATCH_ENDED"
@@ -8664,7 +8685,7 @@ async function startAndWaitForPlayCompletion(input) {
8664
8685
  signal: controller.signal,
8665
8686
  cliAdmission: useCliAdmission
8666
8687
  });
8667
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
8688
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
8668
8689
  phase: "cli.play_start_admission_attempt",
8669
8690
  ms: Date.now() - postStartedAt,
8670
8691
  ok: true,
@@ -8676,7 +8697,7 @@ async function startAndWaitForPlayCompletion(input) {
8676
8697
  });
8677
8698
  break;
8678
8699
  } catch (error) {
8679
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
8700
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
8680
8701
  phase: "cli.play_start_admission_attempt",
8681
8702
  ms: Date.now() - postStartedAt,
8682
8703
  ok: false,
@@ -8698,7 +8719,7 @@ async function startAndWaitForPlayCompletion(input) {
8698
8719
  prepared.workflowId
8699
8720
  );
8700
8721
  }
8701
- if (callerIntentV2 && error instanceof _chunk2KHUFWTKjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
8722
+ if (callerIntentV2 && error instanceof _chunkCQDQNZGHjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
8702
8723
  if (currentAttempt > 1) {
8703
8724
  throw new PlayStartOutcomeUnknownError(
8704
8725
  input.playName,
@@ -8719,7 +8740,7 @@ async function startAndWaitForPlayCompletion(input) {
8719
8740
  waitTimeoutMs: remaining === null ? null : Math.max(1, remaining)
8720
8741
  });
8721
8742
  }
8722
- if (useCliAdmission && error instanceof _chunk2KHUFWTKjs.CliPlayAdmissionUnsupportedError) {
8743
+ if (useCliAdmission && error instanceof _chunkCQDQNZGHjs.CliPlayAdmissionUnsupportedError) {
8723
8744
  if (currentAttempt > 1) {
8724
8745
  throw new PlayStartOutcomeUnknownError(
8725
8746
  input.playName,
@@ -8727,7 +8748,7 @@ async function startAndWaitForPlayCompletion(input) {
8727
8748
  prepared.workflowId
8728
8749
  );
8729
8750
  }
8730
- await _chunkHPJAE6PPjs.checkPlayRunCompatibility.call(void 0,
8751
+ await _chunkZZ4MF2GIjs.checkPlayRunCompatibility.call(void 0,
8731
8752
  input.client.baseUrl,
8732
8753
  input.maintenancePolicy
8733
8754
  );
@@ -8745,7 +8766,7 @@ async function startAndWaitForPlayCompletion(input) {
8745
8766
  `[play start] response was ambiguous; retrying the same caller intent (${error instanceof Error ? error.message : String(error)})`
8746
8767
  );
8747
8768
  }
8748
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
8769
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
8749
8770
  phase: "cli.play_start_json_retry",
8750
8771
  ms: 0,
8751
8772
  ok: true,
@@ -8795,7 +8816,7 @@ async function startAndWaitForPlayCompletion(input) {
8795
8816
  }
8796
8817
  const workflowId = started.workflowId;
8797
8818
  if (!workflowId || workflowId === "pending") {
8798
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
8819
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
8799
8820
  "Play admission returned no run id. Check recent runs before submitting again.",
8800
8821
  void 0,
8801
8822
  "PLAY_START_MISSING_RUN_ID"
@@ -8825,7 +8846,7 @@ async function startAndWaitForPlayCompletion(input) {
8825
8846
  _nullishCoalesce(input.open, () => ( false))
8826
8847
  );
8827
8848
  input.progress.phase("running");
8828
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
8849
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
8829
8850
  phase: "cli.play_start_admitted",
8830
8851
  ms: Date.now() - startedAt,
8831
8852
  ok: true,
@@ -8843,7 +8864,7 @@ async function startAndWaitForPlayCompletion(input) {
8843
8864
  startedAt,
8844
8865
  waitTimeoutMs: input.waitTimeoutMs
8845
8866
  });
8846
- const initialStatus = _chunkDGKTHWWHjs.normalizePlayStatus.call(void 0, initialTerminal);
8867
+ const initialStatus = _chunk2B4IOGFDjs.normalizePlayStatus.call(void 0, initialTerminal);
8847
8868
  const status2 = await resolvePlayRunOutputStatus({
8848
8869
  client: input.client,
8849
8870
  status: initialStatus,
@@ -8851,7 +8872,7 @@ async function startAndWaitForPlayCompletion(input) {
8851
8872
  jsonOutput: input.jsonOutput,
8852
8873
  fromDurableStatus: true
8853
8874
  });
8854
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
8875
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
8855
8876
  phase: "play_watch_terminal_status",
8856
8877
  workflowId,
8857
8878
  full: true,
@@ -8942,7 +8963,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
8942
8963
  notice.value
8943
8964
  );
8944
8965
  } catch (error) {
8945
- if (callerIntentV2 && error instanceof _chunk2KHUFWTKjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
8966
+ if (callerIntentV2 && error instanceof _chunkCQDQNZGHjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
8946
8967
  const remaining = input.waitTimeoutMs === null ? null : input.waitTimeoutMs - (Date.now() - admissionStartedAt);
8947
8968
  assertPlayWaitNotTimedOut({
8948
8969
  workflowId: "",
@@ -8955,8 +8976,8 @@ async function startAndWaitForPlayCompletionByStream(input) {
8955
8976
  waitTimeoutMs: remaining === null ? null : Math.max(1, remaining)
8956
8977
  });
8957
8978
  }
8958
- if (error instanceof _chunk2KHUFWTKjs.CliPlayAdmissionUnsupportedError && input.cliAdmission) {
8959
- await _chunkHPJAE6PPjs.checkPlayRunCompatibility.call(void 0,
8979
+ if (error instanceof _chunkCQDQNZGHjs.CliPlayAdmissionUnsupportedError && input.cliAdmission) {
8980
+ await _chunkZZ4MF2GIjs.checkPlayRunCompatibility.call(void 0,
8960
8981
  input.client.baseUrl,
8961
8982
  input.maintenancePolicy,
8962
8983
  admissionDeadline.signal
@@ -8983,7 +9004,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
8983
9004
  if (!(error instanceof RetryablePlayStartAttemptError)) throw error;
8984
9005
  const retryDelayMs2 = retryDelays[attempt];
8985
9006
  if (retryDelayMs2 === void 0) {
8986
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
9007
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
8987
9008
  `Play ${input.playName} did not start after retrying transient start failures.`,
8988
9009
  void 0,
8989
9010
  "PLAY_START_RETRY_EXHAUSTED",
@@ -8997,7 +9018,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
8997
9018
  `[play watch] start response was ambiguous; retrying the same caller intent (${error.message})`
8998
9019
  );
8999
9020
  }
9000
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
9021
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
9001
9022
  phase: "cli.play_start_stream_retry",
9002
9023
  ms: 0,
9003
9024
  ok: true,
@@ -9018,7 +9039,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
9018
9039
  `[play watch] start failed before run id with a transient error; retrying (${playStatusErrorText(status)})`
9019
9040
  );
9020
9041
  }
9021
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
9042
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
9022
9043
  phase: "cli.play_start_stream_retry",
9023
9044
  ms: 0,
9024
9045
  ok: true,
@@ -9028,7 +9049,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
9028
9049
  });
9029
9050
  await sleepOrAbort(retryDelayMs, admissionDeadline.signal);
9030
9051
  }
9031
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
9052
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
9032
9053
  `Play ${input.playName} did not start after retrying transient start failures.`,
9033
9054
  void 0,
9034
9055
  "PLAY_START_RETRY_EXHAUSTED"
@@ -9075,7 +9096,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9075
9096
  if (launchConfirmed || !runId || runId === "pending") return;
9076
9097
  launchConfirmed = true;
9077
9098
  await _optionalChain([input, 'access', _314 => _314.onRunAdmitted, 'optionalCall', _315 => _315(runId)]);
9078
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
9099
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
9079
9100
  phase: "cli.play_start_admitted",
9080
9101
  ms: Date.now() - startedAt,
9081
9102
  ok: true,
@@ -9109,7 +9130,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9109
9130
  full: input.fullJson
9110
9131
  });
9111
9132
  } catch (error) {
9112
- if (_chunkDGKTHWWHjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
9133
+ if (_chunk2B4IOGFDjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
9113
9134
  return null;
9114
9135
  }
9115
9136
  throw error;
@@ -9251,7 +9272,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9251
9272
  let fromDurableStatus = reuseFullTerminal;
9252
9273
  let canonicalTerminal;
9253
9274
  const streamedTerminalPackage = getPlayRunPackage(finalStatus);
9254
- const streamedTerminalPlayRunPackage = _chunk2KHUFWTKjs.isPlayRunPackage.call(void 0,
9275
+ const streamedTerminalPlayRunPackage = _chunkCQDQNZGHjs.isPlayRunPackage.call(void 0,
9255
9276
  streamedTerminalPackage
9256
9277
  ) ? streamedTerminalPackage : null;
9257
9278
  const terminalEnvelopeIsComplete = finalStatus.status === "completed" && (event.type === "play.run.snapshot" || event.type === "play.run.final_status") && getEventPayload(event).replayed !== true && finalStatus.runId === lastKnownWorkflowId && !playRunPackageTextLedgerIncomplete(streamedTerminalPackage);
@@ -9280,7 +9301,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9280
9301
  };
9281
9302
  }
9282
9303
  if (!canonicalTerminal) {
9283
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
9304
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
9284
9305
  phase: "cli.play_start_stream_stale_terminal_ignored",
9285
9306
  ms: Date.now() - startedAt,
9286
9307
  ok: true,
@@ -9301,14 +9322,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9301
9322
  fromDurableStatus
9302
9323
  }) : canonicalTerminal;
9303
9324
  if (input.fullJson === true) {
9304
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
9325
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
9305
9326
  phase: "play_watch_terminal_status",
9306
9327
  workflowId: outputTerminal.runId || lastKnownWorkflowId || void 0,
9307
9328
  full: true,
9308
9329
  source: outputTerminal === canonicalTerminal ? fromDurableStatus ? "start_stream_durable" : "start_stream" : "durable_repair"
9309
9330
  });
9310
9331
  }
9311
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
9332
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
9312
9333
  phase: "cli.play_start_stream_terminal",
9313
9334
  ms: Date.now() - startedAt,
9314
9335
  ok: true,
@@ -9328,7 +9349,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9328
9349
  clearTimeout(timeout);
9329
9350
  }
9330
9351
  controller.abort();
9331
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
9352
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
9332
9353
  phase: "cli.play_start_stream_handoff_to_tail",
9333
9354
  ms: Date.now() - startedAt,
9334
9355
  ok: true,
@@ -9359,7 +9380,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9359
9380
  if (timedOut) {
9360
9381
  const terminal = await fetchKnownTerminalStatus();
9361
9382
  if (terminal) {
9362
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
9383
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
9363
9384
  phase: "cli.play_start_stream_timeout_status_reconcile",
9364
9385
  ms: Date.now() - startedAt,
9365
9386
  ok: true,
@@ -9379,7 +9400,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9379
9400
  lastPhase
9380
9401
  });
9381
9402
  }
9382
- if (lastKnownWorkflowId && (terminalWindowExpired || _chunkDGKTHWWHjs.isTransientPlayRunReadError.call(void 0, error))) {
9403
+ if (lastKnownWorkflowId && (terminalWindowExpired || _chunk2B4IOGFDjs.isTransientPlayRunReadError.call(void 0, error))) {
9383
9404
  if (timeout) {
9384
9405
  clearTimeout(timeout);
9385
9406
  }
@@ -9390,7 +9411,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9390
9411
  `
9391
9412
  );
9392
9413
  }
9393
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
9414
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
9394
9415
  phase: "cli.play_start_stream_reconnect",
9395
9416
  ms: Date.now() - startedAt,
9396
9417
  ok: true,
@@ -9417,7 +9438,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9417
9438
  });
9418
9439
  }
9419
9440
  if (!lastKnownWorkflowId && isAmbiguousPlayStartOutcomeError(error)) {
9420
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
9441
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
9421
9442
  phase: "cli.play_start_stream_transient_failure",
9422
9443
  ms: Date.now() - startedAt,
9423
9444
  ok: false,
@@ -9445,7 +9466,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9445
9466
  `[play watch] start stream ended after run ${lastKnownWorkflowId}; reconnecting to canonical run stream`
9446
9467
  );
9447
9468
  }
9448
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
9469
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
9449
9470
  phase: "cli.play_start_stream_reconnect",
9450
9471
  ms: Date.now() - startedAt,
9451
9472
  ok: true,
@@ -9474,7 +9495,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9474
9495
  }
9475
9496
  const phaseSuffix = lastPhase && lastPhase.trim() ? ` (last observed phase: ${lastPhase.trim()})` : "";
9476
9497
  const idSuffix = lastKnownWorkflowId ? ` runId=${lastKnownWorkflowId}` : "";
9477
- const endedBeforeConfirmation = new (0, _chunkSQWET4SLjs.DeeplineError)(
9498
+ const endedBeforeConfirmation = new (0, _chunkBBTKAASQjs.DeeplineError)(
9478
9499
  `Play start request ended before terminal status was observed${idSuffix}${phaseSuffix}.`,
9479
9500
  void 0,
9480
9501
  "PLAY_START_STREAM_ENDED",
@@ -9525,7 +9546,7 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
9525
9546
  "logs"
9526
9547
  ]);
9527
9548
  function formatPlayLogLine(rawLine, state) {
9528
- const classified = _chunkDGKTHWWHjs.classifyLogLine.call(void 0, rawLine);
9549
+ const classified = _chunk2B4IOGFDjs.classifyLogLine.call(void 0, rawLine);
9529
9550
  const line = classified.line;
9530
9551
  const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
9531
9552
  const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _337 => _337[1]]) ? new Date(timestampMatch[1]) : null;
@@ -9540,14 +9561,14 @@ function formatPlayLogLine(rawLine, state) {
9540
9561
  if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
9541
9562
  const providerWait = formatProviderCapacityWaitLogLine(line);
9542
9563
  if (providerWait && !state.verbose) {
9543
- return _chunkDGKTHWWHjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
9564
+ return _chunk2B4IOGFDjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
9544
9565
  }
9545
9566
  const mapProgress = formatMapProgressDiagnosticLogLine(line);
9546
9567
  if (mapProgress && !state.verbose) {
9547
- return _chunkDGKTHWWHjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
9568
+ return _chunk2B4IOGFDjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
9548
9569
  }
9549
9570
  if (/\[worker\] picked up run\b/.test(message)) {
9550
- if (!_chunkDGKTHWWHjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
9571
+ if (!_chunk2B4IOGFDjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
9551
9572
  return null;
9552
9573
  }
9553
9574
  if (state.emittedRunnerStarted) {
@@ -9560,21 +9581,21 @@ function formatPlayLogLine(rawLine, state) {
9560
9581
  /^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
9561
9582
  );
9562
9583
  if (mapStart) {
9563
- if (!_chunkDGKTHWWHjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
9584
+ if (!_chunk2B4IOGFDjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
9564
9585
  return null;
9565
9586
  }
9566
9587
  const [, rows, fields2, namespace, cached, pending] = mapStart;
9567
- return `${prefix}map ${namespace}: ${formatInteger(Number(rows))} rows, ${fields2} fields, ${formatInteger(Number(cached))} cached, ${formatInteger(Number(pending))} pending`;
9588
+ return `${prefix}map ${namespace}: ${formatInteger(Number(rows))} rows, ${fields2} fields, ${formatInteger(Number(cached))} rows already satisfied, ${formatInteger(Number(pending))} pending`;
9568
9589
  }
9569
9590
  const mapDone = message.match(
9570
9591
  /^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
9571
9592
  );
9572
9593
  if (mapDone) {
9573
- if (!_chunkDGKTHWWHjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
9594
+ if (!_chunk2B4IOGFDjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
9574
9595
  return null;
9575
9596
  }
9576
9597
  const [, results, executed, cached] = mapDone;
9577
- return `${prefix}done: ${formatInteger(Number(results))} results, ${formatInteger(Number(executed))} executed, ${formatInteger(Number(cached))} cached`;
9598
+ return `${prefix}done: ${formatInteger(Number(results))} results, ${formatInteger(Number(executed))} executed, ${formatInteger(Number(cached))} rows already satisfied`;
9578
9599
  }
9579
9600
  if (!watchSurfaceReaches(state, classified.provenance, classified.level)) {
9580
9601
  return null;
@@ -9990,7 +10011,7 @@ function buildInsufficientCreditsSummaryLines(input) {
9990
10011
  const lines = [
9991
10012
  " status: stopped_insufficient_credits",
9992
10013
  completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
9993
- " completed provider work: reused automatically when you rerun after adding credits"
10014
+ " saved work: resume this run after adding credits to recover matching completed operations; unfinished work can incur charges"
9994
10015
  ];
9995
10016
  const billingUrl = getStringField(input.billing, "billing_url");
9996
10017
  const recommended = formatCreditAmount2(
@@ -10494,7 +10515,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
10494
10515
  executed === null ? `executed unknown${!includeRowOutcomes || total === null ? "" : ` (${formatInteger(total)} total)`}` : `${formatInteger(executed)}${total === null ? "" : `/${formatInteger(total)}`} executed`
10495
10516
  ];
10496
10517
  for (const [key, label] of [
10497
- ["reused", "reused"],
10518
+ ["reused", "duplicate rows reused"],
10498
10519
  ["skipped", "skipped"],
10499
10520
  ["pending", "remaining"],
10500
10521
  ["activeRows", "rows processing"],
@@ -10547,7 +10568,7 @@ function formatPackageDatasetActionLines(packaged, options) {
10547
10568
  } else if (includeSummary) {
10548
10569
  if (category === "recovered" && Object.keys(actions2).length === 0) {
10549
10570
  lines.push(
10550
- ` dataset ${path}: available, ${rowCount === null ? "persisted" : formatInteger(rowCount)} rows persisted; re-running reuses completed work`
10571
+ ` dataset ${path}: available, ${rowCount === null ? "unknown number of" : formatInteger(rowCount)} rows persisted; inspect or export before resuming unfinished work`
10551
10572
  );
10552
10573
  } else {
10553
10574
  lines.push(
@@ -10598,15 +10619,29 @@ function formatPackageDatasetActionLines(packaged, options) {
10598
10619
  return lines;
10599
10620
  }
10600
10621
  function packageSavedRowCount(packaged) {
10601
- const rowCounts = packageDatasetRecords(packaged).map((dataset) => dataset.rowCount).filter(
10602
- (rowCount) => typeof rowCount === "number" && Number.isFinite(rowCount)
10603
- ).map((rowCount) => Math.max(0, Math.trunc(rowCount)));
10604
- if (rowCounts.length === 0) return null;
10605
- return rowCounts.reduce((total, rowCount) => total + rowCount, 0);
10622
+ const datasets = packageDatasetRecords(packaged);
10623
+ if (datasets.length === 0) return null;
10624
+ let total = 0;
10625
+ for (const dataset of datasets) {
10626
+ const rowCount = readNonNegativeInteger(dataset.rowCount);
10627
+ if (rowCount === null || _optionalChain([readRecord, 'call', _385 => _385(dataset.lifecycle), 'optionalAccess', _386 => _386.complete]) === false)
10628
+ return null;
10629
+ total += rowCount;
10630
+ }
10631
+ return total;
10632
+ }
10633
+ function formatRunRecoveryCommandLines(runId, status) {
10634
+ if (!["failed", "cancelled"].includes(status) || !runId || runId === "unknown")
10635
+ return [];
10636
+ return [
10637
+ ` Resume same run (recommended, if eligible): deepline runs resume ${_chunkAID3OYVJjs.shellQuote.call(void 0, runId)}`,
10638
+ ` Start over instead (new run; may repeat paid calls): deepline plays run --from-run ${_chunkAID3OYVJjs.shellQuote.call(void 0, runId)}`,
10639
+ "Resume can reuse matching saved operations, even with staleAfterSeconds: 0. New runs reuse matching cached results within staleAfterSeconds (0 means fresh). Fresh, missing, or unrecorded calls may charge again."
10640
+ ];
10606
10641
  }
10607
10642
  function runtimeLimitWindowLabel(runtimeLimitFailure) {
10608
10643
  const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
10609
- const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _385 => _385.exec, 'call', _386 => _386(message), 'optionalAccess', _387 => _387[1]]);
10644
+ const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _387 => _387.exec, 'call', _388 => _388(message), 'optionalAccess', _389 => _389[1]]);
10610
10645
  if (configuredSeconds) {
10611
10646
  const seconds = Number(configuredSeconds);
10612
10647
  if (Number.isSafeInteger(seconds) && seconds > 0) {
@@ -10625,22 +10660,12 @@ function runtimeLimitWindowLabel(runtimeLimitFailure) {
10625
10660
  function runtimeLimitCheckpointLines(packaged, runId, runtimeLimitFailure) {
10626
10661
  const savedRows = packageSavedRowCount(packaged);
10627
10662
  const lines = [
10628
- `\u2713 progress saved ${runId}`,
10629
- "",
10630
- `The Play reached its ${runtimeLimitWindowLabel(runtimeLimitFailure)} runtime window.`
10663
+ `\u2717 runtime limit reached (${runtimeLimitWindowLabel(runtimeLimitFailure)}) ${runId}`,
10664
+ `Saved Dataset rows: ${savedRows === null ? "unknown" : formatInteger(savedRows)}`
10631
10665
  ];
10632
- if (savedRows === null) {
10633
- lines.push("Progress completed before the runtime window closed.");
10634
- } else {
10635
- lines.push(
10636
- `${formatInteger(savedRows)} ${savedRows === 1 ? "row was" : "rows were"} saved successfully.`
10637
- );
10666
+ if (packageDatasetRecords(packaged).length === 0 && formatPackageValueOutputLines(packaged).length === 0) {
10667
+ lines.push("Rows kept only in memory were not published.");
10638
10668
  }
10639
- lines.push(
10640
- "",
10641
- "Run the same Play again to continue where you left off.",
10642
- "Completed work will be reused automatically."
10643
- );
10644
10669
  return lines;
10645
10670
  }
10646
10671
  function formatInlinePackageValue(value) {
@@ -10653,7 +10678,7 @@ function formatPackageValueOutputLines(packaged) {
10653
10678
  if (!outputs) return [];
10654
10679
  const returned = Object.entries(outputs).filter(([, output]) => {
10655
10680
  const record4 = readRecord(output);
10656
- return _optionalChain([record4, 'optionalAccess', _388 => _388.kind]) === "dataset" || _optionalChain([record4, 'optionalAccess', _389 => _389.kind]) === "value" && Object.prototype.hasOwnProperty.call(record4, "value");
10681
+ return _optionalChain([record4, 'optionalAccess', _390 => _390.kind]) === "dataset" || _optionalChain([record4, 'optionalAccess', _391 => _391.kind]) === "value" && Object.prototype.hasOwnProperty.call(record4, "value");
10657
10682
  });
10658
10683
  if (returned.length === 0) return [];
10659
10684
  const datasets = packageDatasetRecords(packaged);
@@ -10673,10 +10698,10 @@ function formatPackageValueOutputLines(packaged) {
10673
10698
  (candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
10674
10699
  );
10675
10700
  const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
10676
- (candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _390 => _390.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _391 => _391.path]) === path
10701
+ (candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _392 => _392.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _393 => _393.path]) === path
10677
10702
  );
10678
- const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _392 => _392.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _393 => _393.preview]))));
10679
- const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _394 => _394.rows])) ? preview.rows.slice(0, 2) : [];
10703
+ const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _394 => _394.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _395 => _395.preview]))));
10704
+ const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _396 => _396.rows])) ? preview.rows.slice(0, 2) : [];
10680
10705
  if (rows.length > 0) {
10681
10706
  lines.push(` sample rows (${rows.length}):`);
10682
10707
  lines.push(
@@ -10702,7 +10727,7 @@ function formatPackageValueOutputLines(packaged) {
10702
10727
  return lines;
10703
10728
  }
10704
10729
  function authoredPackageStackFrames(packaged) {
10705
- const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _395 => _395.trim, 'call', _396 => _396()])));
10730
+ const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _397 => _397.trim, 'call', _398 => _398()])));
10706
10731
  if (!stack) return [];
10707
10732
  return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
10708
10733
  (line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
@@ -10734,9 +10759,9 @@ function activityIsoTimestamp(value) {
10734
10759
  }
10735
10760
  function buildRunActivityTextLines(run) {
10736
10761
  const activity = readRecord(run.activity);
10737
- const observation = readRecord(_optionalChain([activity, 'optionalAccess', _397 => _397.observation]));
10738
- const state = readRecord(_optionalChain([observation, 'optionalAccess', _398 => _398.state]));
10739
- const target = readRecord(_optionalChain([observation, 'optionalAccess', _399 => _399.target]));
10762
+ const observation = readRecord(_optionalChain([activity, 'optionalAccess', _399 => _399.observation]));
10763
+ const state = readRecord(_optionalChain([observation, 'optionalAccess', _400 => _400.state]));
10764
+ const target = readRecord(_optionalChain([observation, 'optionalAccess', _401 => _401.target]));
10740
10765
  if (!activity || !observation || !state) return [];
10741
10766
  const kind = typeof state.kind === "string" ? state.kind : "unknown";
10742
10767
  if (kind === "completed") return [];
@@ -10781,11 +10806,11 @@ function buildRunActivityTextLines(run) {
10781
10806
  }
10782
10807
  function formatObservedRunCounter(value) {
10783
10808
  const counter = readRecord(value);
10784
- const count2 = _optionalChain([counter, 'optionalAccess', _400 => _400.value]);
10809
+ const count2 = _optionalChain([counter, 'optionalAccess', _402 => _402.value]);
10785
10810
  if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
10786
10811
  return "unknown";
10787
10812
  }
10788
- return _optionalChain([counter, 'optionalAccess', _401 => _401.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
10813
+ return _optionalChain([counter, 'optionalAccess', _403 => _403.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
10789
10814
  }
10790
10815
  function buildRunStatusEvidenceTextLines(packaged) {
10791
10816
  const evidence = readRecord(packaged.runStatus);
@@ -10798,13 +10823,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
10798
10823
  );
10799
10824
  }
10800
10825
  const source = readRecord(evidence.source);
10801
- if (_optionalChain([source, 'optionalAccess', _402 => _402.aligned]) === false) {
10826
+ if (_optionalChain([source, 'optionalAccess', _404 => _404.aligned]) === false) {
10802
10827
  lines.push(
10803
10828
  ` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
10804
10829
  );
10805
10830
  }
10806
10831
  const focus = readRecord(evidence.focusStep);
10807
- const rows = readRecord(_optionalChain([focus, 'optionalAccess', _403 => _403.rows]));
10832
+ const rows = readRecord(_optionalChain([focus, 'optionalAccess', _405 => _405.rows]));
10808
10833
  if (focus) {
10809
10834
  const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
10810
10835
  const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
@@ -10812,7 +10837,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
10812
10837
  const known = readRecordArray(packaged.steps).find(
10813
10838
  (step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
10814
10839
  );
10815
- const state = typeof _optionalChain([known, 'optionalAccess', _404 => _404.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
10840
+ const state = typeof _optionalChain([known, 'optionalAccess', _406 => _406.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
10816
10841
  deriveNodeExecutionState({
10817
10842
  reported: {
10818
10843
  status: focus.status.trim(),
@@ -10822,7 +10847,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
10822
10847
  total: rows.total
10823
10848
  } : null
10824
10849
  },
10825
- runStatus: _optionalChain([run, 'optionalAccess', _405 => _405.status])
10850
+ runStatus: _optionalChain([run, 'optionalAccess', _407 => _407.status])
10826
10851
  })
10827
10852
  ) : null;
10828
10853
  lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
@@ -10870,7 +10895,7 @@ function formatRecentRunLogLines(value) {
10870
10895
  (line) => typeof line === "string"
10871
10896
  );
10872
10897
  if (tail.length === 0) return [];
10873
- const shown = tail.map((line) => _chunkDGKTHWWHjs.classifyLogLine.call(void 0, line)).filter(
10898
+ const shown = tail.map((line) => _chunk2B4IOGFDjs.classifyLogLine.call(void 0, line)).filter(
10874
10899
  (entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
10875
10900
  ).slice(-8);
10876
10901
  const total = readNonNegativeInteger(logs.totalCount);
@@ -10914,7 +10939,7 @@ function buildRunPackageTextLines(packaged) {
10914
10939
  lines.push(` recovery: ${mode}${sourceRunId}`);
10915
10940
  }
10916
10941
  const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
10917
- const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _406 => _406.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
10942
+ const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _408 => _408.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
10918
10943
  const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
10919
10944
  if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
10920
10945
  lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
@@ -10925,11 +10950,11 @@ function buildRunPackageTextLines(packaged) {
10925
10950
  }
10926
10951
  }
10927
10952
  const failedLogs = readRecord(packaged.failedLogs);
10928
- const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _407 => _407.entries])) ? failedLogs.entries.filter(
10953
+ const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _409 => _409.entries])) ? failedLogs.entries.filter(
10929
10954
  (entry) => typeof entry === "string"
10930
10955
  ) : [];
10931
- const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _408 => _408.association]) === "string" ? failedLogs.association : null;
10932
- const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _409 => _409.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
10956
+ const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _410 => _410.association]) === "string" ? failedLogs.association : null;
10957
+ const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _411 => _411.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
10933
10958
  if (failedLogEntries.length > 0) {
10934
10959
  lines.push(" failed logs:");
10935
10960
  lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
@@ -10948,8 +10973,8 @@ function buildRunPackageTextLines(packaged) {
10948
10973
  )
10949
10974
  ).slice(0, 16) : [];
10950
10975
  lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
10951
- const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _410 => _410.next]));
10952
- if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _411 => _411.logs]) === "string") {
10976
+ const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _412 => _412.next]));
10977
+ if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _413 => _413.logs]) === "string") {
10953
10978
  lines.push(
10954
10979
  failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
10955
10980
  );
@@ -10977,23 +11002,22 @@ function buildRunPackageTextLines(packaged) {
10977
11002
  const stepStatus = typeof step.status === "string" ? step.status : status;
10978
11003
  const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
10979
11004
  const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
10980
- const preview = _optionalChain([output, 'optionalAccess', _412 => _412.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
10981
- const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _413 => _413.rows])) ? preview.rows.length : null;
11005
+ const preview = _optionalChain([output, 'optionalAccess', _414 => _414.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
11006
+ const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _415 => _415.rows])) ? preview.rows.length : null;
10982
11007
  lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
10983
- lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _414 => _414.summary])));
11008
+ lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _416 => _416.summary])));
10984
11009
  if (previewRows !== null) {
10985
11010
  lines.push(
10986
- ` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _415 => _415.truncated]) ? " truncated" : ""}`
11011
+ ` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _417 => _417.truncated]) ? " truncated" : ""}`
10987
11012
  );
10988
11013
  }
10989
11014
  }
10990
11015
  const inspectCommand = actionToCommand(next.inspect);
10991
11016
  const fullResultCommand = actionToCommand(next.full);
10992
11017
  const hasCatalogExportAction = packageDatasetRecords(packaged).some(
10993
- (dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _416 => _416(dataset.actions), 'optionalAccess', _417 => _417.exportCsv])))
11018
+ (dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _418 => _418(dataset.actions), 'optionalAccess', _419 => _419.exportCsv])))
10994
11019
  );
10995
11020
  const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
10996
- const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
10997
11021
  if (inspectCommand) lines.push(` inspect: ${inspectCommand}`);
10998
11022
  if (fullResultCommand)
10999
11023
  lines.push(
@@ -11003,9 +11027,11 @@ function buildRunPackageTextLines(packaged) {
11003
11027
  if (legacyExportCommand) {
11004
11028
  lines.push(` export CSV: ${legacyExportCommand}`);
11005
11029
  }
11006
- if (runAgainCommand && !isRuntimeLimitCheckpoint) {
11007
- lines.push(" run again (completed work is reused):");
11008
- lines.push(` ${runAgainCommand}`);
11030
+ lines.push(...formatRunRecoveryCommandLines(runId, status));
11031
+ if (status === "failed" || status === "cancelled") {
11032
+ lines.push(
11033
+ "Dataset reuse counts do not measure all tool or child-Play reuse."
11034
+ );
11009
11035
  }
11010
11036
  return lines;
11011
11037
  }
@@ -11055,7 +11081,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
11055
11081
  }
11056
11082
  function buildBillingRollupTextLines(status) {
11057
11083
  const billing = status.billing;
11058
- const rollup = _optionalChain([billing, 'optionalAccess', _418 => _418.rollup]);
11084
+ const rollup = _optionalChain([billing, 'optionalAccess', _420 => _420.rollup]);
11059
11085
  if (!rollup) return [];
11060
11086
  const total = formatCreditAmount2(rollup.totalCreditsRollup);
11061
11087
  if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
@@ -11074,7 +11100,7 @@ function buildBillingRollupTextLines(status) {
11074
11100
  return [` cost: ${total} credits`];
11075
11101
  }
11076
11102
  function playRunRateLimitedNotice(status) {
11077
- const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call', _419 => _419(status), 'optionalAccess', _420 => _420.rateLimited]), () => ( status.rateLimited));
11103
+ const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call', _421 => _421(status), 'optionalAccess', _422 => _422.rateLimited]), () => ( status.rateLimited));
11078
11104
  return notice && typeof notice === "object" ? notice : null;
11079
11105
  }
11080
11106
  function withRateLimitedNotice(status, notice) {
@@ -11115,7 +11141,7 @@ function buildPlayCompletionTextLines(status) {
11115
11141
  const overview = buildRunOverview(status);
11116
11142
  const { run } = overview;
11117
11143
  const failed = run.status === "failed";
11118
- const label = run.status === "completed" ? _optionalChain([overview, 'access', _421 => _421.rowOutcomes, 'optionalAccess', _422 => _422.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
11144
+ const label = run.status === "completed" ? _optionalChain([overview, 'access', _423 => _423.rowOutcomes, 'optionalAccess', _424 => _424.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
11119
11145
  const rateLimited = playRunRateLimitedNotice(status);
11120
11146
  const lines = [
11121
11147
  ...rateLimited ? [rateLimited.message] : [],
@@ -11131,7 +11157,7 @@ function buildPlayCompletionTextLines(status) {
11131
11157
  }
11132
11158
  if (overview.errorDetails.run)
11133
11159
  lines.push(
11134
- `Error: ${truncateErrorForDisplay(overview.errorDetails.run, run.id)}`
11160
+ `Error: ${readRecordArray(overview.errorDetails.reported).some((failure) => failure.code === "RUNTIME_LIMIT_EXCEEDED") ? "Runtime limit reached." : truncateErrorForDisplay(overview.errorDetails.run, run.id)}`
11135
11161
  );
11136
11162
  if (Object.hasOwn(overview, "result")) {
11137
11163
  lines.push(
@@ -11139,7 +11165,7 @@ function buildPlayCompletionTextLines(status) {
11139
11165
  ...formatJsonPreview(compactReturnValue(overview.result))
11140
11166
  );
11141
11167
  }
11142
- if (_optionalChain([overview, 'access', _423 => _423.rowOutcomes, 'optionalAccess', _424 => _424.hasRowFailures])) {
11168
+ if (_optionalChain([overview, 'access', _425 => _425.rowOutcomes, 'optionalAccess', _426 => _426.hasRowFailures])) {
11143
11169
  lines.push(
11144
11170
  `Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
11145
11171
  );
@@ -11162,23 +11188,29 @@ function buildPlayCompletionTextLines(status) {
11162
11188
  _nullishCoalesce(overview.actions.getLogsCmd, () => ( `deepline runs logs ${_chunkAID3OYVJjs.shellQuote.call(void 0, run.id)}`))
11163
11189
  )}`
11164
11190
  );
11165
- if (failed && status.rerunCommand)
11166
- lines.push(`Retry: ${status.rerunCommand}`);
11191
+ if (failed && overview.datasets.length === 0 && !Object.hasOwn(overview, "result")) {
11192
+ lines.push(
11193
+ "No Dataset output is listed. Rows kept only in memory were not published."
11194
+ );
11195
+ }
11196
+ if (failed || run.status === "cancelled") {
11197
+ lines.push(...formatRunRecoveryCommandLines(run.id, run.status));
11198
+ }
11167
11199
  return lines;
11168
11200
  }
11169
11201
  function writePlayResult(status, jsonOutput, options) {
11170
11202
  const packaged = getPlayRunPackage(status);
11171
- if (status.package) _chunkV7SCRUFQjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
11172
- const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _425 => _425.hits]), () => ( null));
11203
+ if (status.package) _chunkKWYGWO4Yjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
11204
+ const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _427 => _427.hits]), () => ( null));
11173
11205
  if (jsonOutput) {
11174
- const payload2 = _optionalChain([options, 'optionalAccess', _426 => _426.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
11175
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
11206
+ const payload2 = _optionalChain([options, 'optionalAccess', _428 => _428.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
11207
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
11176
11208
  hits ? { ...payload2, hits } : payload2,
11177
- { json: true, fields: _optionalChain([options, 'optionalAccess', _427 => _427.jsonFields]) }
11209
+ { json: true, fields: _optionalChain([options, 'optionalAccess', _429 => _429.jsonFields]) }
11178
11210
  );
11179
11211
  return;
11180
11212
  }
11181
- if (packaged && !_optionalChain([options, 'optionalAccess', _428 => _428.fullJson])) {
11213
+ if (packaged && !_optionalChain([options, 'optionalAccess', _430 => _430.fullJson])) {
11182
11214
  const {
11183
11215
  logs: _logs,
11184
11216
  failedLogs: _failedLogs,
@@ -11188,7 +11220,7 @@ function writePlayResult(status, jsonOutput, options) {
11188
11220
  ...buildPlayCompletionTextLines(status),
11189
11221
  ...formatRunHitsLines(hits)
11190
11222
  ];
11191
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, displayPackage, {
11223
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, displayPackage, {
11192
11224
  json: false,
11193
11225
  text: `${lines2.join("\n")}
11194
11226
  `
@@ -11222,10 +11254,9 @@ function writePlayResult(status, jsonOutput, options) {
11222
11254
  );
11223
11255
  if (status.status === "failed") {
11224
11256
  lines.push(` failed logs: deepline runs logs ${runId} --failed`);
11225
- if (status.rerunCommand) {
11226
- lines.push(" run again (completed work is reused):");
11227
- lines.push(` ${status.rerunCommand}`);
11228
- }
11257
+ }
11258
+ if (publicStatus === "failed" || publicStatus === "cancelled") {
11259
+ lines.push(...formatRunRecoveryCommandLines(runId, publicStatus));
11229
11260
  }
11230
11261
  const renderedServerView = renderServerResultView(status.resultView);
11231
11262
  if (result) {
@@ -11238,8 +11269,8 @@ function writePlayResult(status, jsonOutput, options) {
11238
11269
  lines.push(...renderedServerView.actions);
11239
11270
  lines.push(...buildBillingRollupTextLines(status));
11240
11271
  const compact = compactPlayStatus(status);
11241
- const payload = _optionalChain([options, 'optionalAccess', _429 => _429.fullJson]) ? status : compact;
11242
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
11272
+ const payload = _optionalChain([options, 'optionalAccess', _431 => _431.fullJson]) ? status : compact;
11273
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
11243
11274
  {
11244
11275
  ...payload,
11245
11276
  render: {
@@ -11300,7 +11331,7 @@ async function resolvePlayRunOutputStatus(input) {
11300
11331
  const fromDurableStatus = input.fromDurableStatus === true || fullDurableTerminalStatuses.has(input.status);
11301
11332
  const refreshForFullJson = input.fullJson && !fromDurableStatus;
11302
11333
  const streamedTextPackageIncomplete = input.status.status === "completed" && playRunPackageTextLedgerIncomplete(streamedPackage);
11303
- const refreshFailedTerminal = input.status.status === "failed" && (!fromDurableStatus || _optionalChain([readRecord, 'call', _430 => _430(_optionalChain([streamedPackage, 'optionalAccess', _431 => _431.run])), 'optionalAccess', _432 => _432.status]) !== "failed");
11334
+ const refreshFailedTerminal = input.status.status === "failed" && (!fromDurableStatus || _optionalChain([readRecord, 'call', _432 => _432(_optionalChain([streamedPackage, 'optionalAccess', _433 => _433.run])), 'optionalAccess', _434 => _434.status]) !== "failed");
11304
11335
  if (!refreshForFullJson && !streamedTextPackageIncomplete && !refreshFailedTerminal) {
11305
11336
  if (input.fullJson && fromDurableStatus && TERMINAL_PLAY_STATUSES.has(input.status.status)) {
11306
11337
  fullDurableTerminalStatuses.add(input.status);
@@ -11407,14 +11438,14 @@ function mergeExportColumns(preferredColumns, rows) {
11407
11438
  return columns;
11408
11439
  }
11409
11440
  function sqlSafeExportColumnName(id) {
11410
- const prefix = _nullishCoalesce(_optionalChain([id, 'access', _433 => _433.trim, 'call', _434 => _434(), 'access', _435 => _435.match, 'call', _436 => _436(/^_+/), 'optionalAccess', _437 => _437[0]]), () => ( ""));
11441
+ const prefix = _nullishCoalesce(_optionalChain([id, 'access', _435 => _435.trim, 'call', _436 => _436(), 'access', _437 => _437.match, 'call', _438 => _438(/^_+/), 'optionalAccess', _439 => _439[0]]), () => ( ""));
11411
11442
  const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
11412
11443
  const safe = `${prefix}${normalized || "column"}`;
11413
11444
  return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
11414
11445
  }
11415
11446
  async function fetchBackingDatasetRows(input) {
11416
11447
  const playName = extractRunPlayName(input.status);
11417
- const tableNamespace = _optionalChain([input, 'access', _438 => _438.rowsInfo, 'access', _439 => _439.tableNamespace, 'optionalAccess', _440 => _440.trim, 'call', _441 => _441()]);
11448
+ const tableNamespace = _optionalChain([input, 'access', _440 => _440.rowsInfo, 'access', _441 => _441.tableNamespace, 'optionalAccess', _442 => _442.trim, 'call', _443 => _443()]);
11418
11449
  if (!playName || !tableNamespace) {
11419
11450
  return null;
11420
11451
  }
@@ -11438,7 +11469,7 @@ async function fetchBackingDatasetRows(input) {
11438
11469
  if (seenEnvelopeKeys.has(key)) {
11439
11470
  const activeRun = !TERMINAL_PLAY_STATUSES.has(input.status.status);
11440
11471
  const waitCommand = `${input.retryCommand} --wait`;
11441
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
11472
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
11442
11473
  "The backing dataset returned a Runtime Sheet row more than once while paging; the export is not ready to write. " + (activeRun ? `Wait for this same run: ${waitCommand}. Do not rerun the Play to retrieve results.` : `Retry with: ${input.retryCommand}`),
11443
11474
  void 0,
11444
11475
  "RUN_EXPORT_NOT_READY",
@@ -11454,7 +11485,7 @@ async function fetchBackingDatasetRows(input) {
11454
11485
  seenEnvelopeKeys.add(key);
11455
11486
  }
11456
11487
  sheetRows.push(...page.rows);
11457
- const summaryTotal = _optionalChain([page, 'access', _442 => _442.summary, 'optionalAccess', _443 => _443.stats, 'optionalAccess', _444 => _444.total]);
11488
+ const summaryTotal = _optionalChain([page, 'access', _444 => _444.summary, 'optionalAccess', _445 => _445.stats, 'optionalAccess', _446 => _446.total]);
11458
11489
  if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
11459
11490
  settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
11460
11491
  }
@@ -11463,7 +11494,7 @@ async function fetchBackingDatasetRows(input) {
11463
11494
  }
11464
11495
  offset += page.rows.length;
11465
11496
  }
11466
- const withError = _chunkV7SCRUFQjs.tableExportHasFailedRows.call(void 0,
11497
+ const withError = _chunkKWYGWO4Yjs.tableExportHasFailedRows.call(void 0,
11467
11498
  sheetRows.filter(
11468
11499
  (row) => Boolean(row) && typeof row === "object" && !Array.isArray(row)
11469
11500
  )
@@ -11479,7 +11510,7 @@ async function fetchBackingDatasetRows(input) {
11479
11510
  return [
11480
11511
  withError ? {
11481
11512
  ...exported,
11482
- [_chunkV7SCRUFQjs.TABLE_EXPORT_ERROR_COLUMN]: _chunkV7SCRUFQjs.tableExportErrorCell.call(void 0,
11513
+ [_chunkKWYGWO4Yjs.TABLE_EXPORT_ERROR_COLUMN]: _chunkKWYGWO4Yjs.tableExportErrorCell.call(void 0,
11483
11514
  row
11484
11515
  )
11485
11516
  } : exported
@@ -11548,7 +11579,7 @@ function assertDatasetHasExportableRows(input) {
11548
11579
  const rowOutcomes = _nullishCoalesce(readRowOutcomeSummary(input.status), () => ( readRowOutcomeSummary(
11549
11580
  getRecordField(getRecordField(input.status, "result"), "_metadata")
11550
11581
  )));
11551
- if (input.allowEmpty === true && input.status.status === "completed" && !getRecordField(input.status, "error") && !getRecordField(input.status.progress, "error") && structuredErrorsForStatus(input.status).length === 0 && input.rowsInfo.complete && input.rowsInfo.totalRows === 0 && _optionalChain([rowOutcomes, 'optionalAccess', _445 => _445.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
11582
+ if (input.allowEmpty === true && input.status.status === "completed" && !getRecordField(input.status, "error") && !getRecordField(input.status.progress, "error") && structuredErrorsForStatus(input.status).length === 0 && input.rowsInfo.complete && input.rowsInfo.totalRows === 0 && _optionalChain([rowOutcomes, 'optionalAccess', _447 => _447.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
11552
11583
  return input.rowsInfo;
11553
11584
  }
11554
11585
  const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.datasetPath, () => ( input.rowsInfo.tableNamespace)), () => ( input.rowsInfo.source)), () => ( "result.rows"));
@@ -11569,7 +11600,7 @@ function assertDatasetHasExportableRows(input) {
11569
11600
  const currentTableQueryCommand2 = input.rowsInfo.currentTableQueryCommand;
11570
11601
  if (!TERMINAL_PLAY_STATUSES.has(input.status.status)) {
11571
11602
  const waitCommand = `${retryCommand} --wait`;
11572
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
11603
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
11573
11604
  `Run ${input.status.runId} is ${runStatus}; this dataset has zero rows to export yet. Wait for this same run: ${waitCommand}. Do not start another run to retrieve results.`,
11574
11605
  void 0,
11575
11606
  "RUN_EXPORT_EMPTY",
@@ -11587,7 +11618,7 @@ function assertDatasetHasExportableRows(input) {
11587
11618
  );
11588
11619
  }
11589
11620
  const explanation = terminalRunWithMissingAdvertisedRows ? ` The terminal result advertised ${advertisedRows} row(s), but none are currently attributed to this run's durable sheet. Those rows may have been reused from an earlier run or the projection may still be lagging; export refuses to guess another run's rows. Retry the same export after projection catches up (do not rerun the Play): ${retryCommand}. If it remains empty, inspect the full package with ${inspectCommand}` + (currentTableQueryCommand2 ? `, then inspect the current table's _run_id/_writer_run_id with ${currentTableQueryCommand2} and export the run that owns those rows` : " and export the run that owns the durable dataset") + "; this command will not use a database-wide table query that could mix runs." : ` The run status is '${runStatus || "unknown"}', so it likely failed before persisting rows to this dataset. That means provider calls may have been billed without a durable row; inspect ${inspectCommand}, fix the failure cause, then rerun the Play so completed receipts can be reused.`;
11590
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
11621
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
11591
11622
  `Run ${input.status.runId} has zero rows to export from dataset '${datasetLabel}'.` + explanation + (available.length > 0 ? ` Available datasets: ${available.join(", ")}.` : " No datasets were materialized for this run."),
11592
11623
  void 0,
11593
11624
  "RUN_EXPORT_EMPTY",
@@ -11620,8 +11651,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
11620
11651
  path: dataset.exportFile(outPath, options),
11621
11652
  rowsInfo: dataset.info(),
11622
11653
  currentTable: false,
11623
- datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _446 => _446.source]), () => ( null)),
11624
- datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _447 => _447.info, 'call', _448 => _448()]), () => ( null))
11654
+ datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _448 => _448.source]), () => ( null)),
11655
+ datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _449 => _449.info, 'call', _450 => _450()]), () => ( null))
11625
11656
  };
11626
11657
  };
11627
11658
  const run = Run.open({
@@ -11633,7 +11664,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
11633
11664
  const returnedRows = datasets.returned().map((dataset) => dataset.info());
11634
11665
  const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
11635
11666
  const selectedDataset = run.dataset(options.datasetPath);
11636
- const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _449 => _449.info, 'call', _450 => _450()]), () => ( null));
11667
+ const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _451 => _451.info, 'call', _452 => _452()]), () => ( null));
11637
11668
  if (!selectedDataset && options.datasetPath) {
11638
11669
  const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
11639
11670
  const commands = datasetChoiceLines({
@@ -11642,7 +11673,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
11642
11673
  outPath,
11643
11674
  options
11644
11675
  });
11645
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
11676
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
11646
11677
  `Run ${status.runId} did not return a dataset at ${options.datasetPath}.` + (available.length > 0 ? ` Available datasets: ${available.join(", ")}.
11647
11678
  ${commands.join("\n")}` : ""),
11648
11679
  void 0,
@@ -11658,7 +11689,7 @@ ${commands.join("\n")}` : ""),
11658
11689
  outPath,
11659
11690
  options
11660
11691
  });
11661
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
11692
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
11662
11693
  `Run ${status.runId} returned multiple datasets. Choose one:
11663
11694
  ${commands.join("\n")}`,
11664
11695
  void 0,
@@ -11681,7 +11712,7 @@ ${commands.join("\n")}`,
11681
11712
  outPath,
11682
11713
  options
11683
11714
  });
11684
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
11715
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
11685
11716
  `Run ${status.runId} has multiple recovered datasets. Choose one:
11686
11717
  ${commands.join("\n")}`,
11687
11718
  void 0,
@@ -11697,14 +11728,14 @@ ${commands.join("\n")}`,
11697
11728
  );
11698
11729
  }
11699
11730
  if (!rowsInfo) {
11700
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
11731
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
11701
11732
  `Run ${status.runId} did not expose a row-shaped final output to export.`
11702
11733
  );
11703
11734
  }
11704
11735
  const canExportPreview = rowsInfo.complete && !rowsInfo.currentTable;
11705
11736
  if (rowsInfo.exportUnavailableReason === "returned_dataset_not_persisted") {
11706
11737
  const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(options.datasetPath, () => ( rowsInfo.source)), () => ( rowsInfo.datasetId)), () => ( "result.rows"));
11707
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
11738
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
11708
11739
  _nullishCoalesce(rowsInfo.exportUnavailableMessage, () => ( `Run ${status.runId} returned rows for '${datasetLabel}' without a run-scoped durable dataset. Persist the rows with deepline.dataset("rows", rows).run() before returning them.`)),
11709
11740
  void 0,
11710
11741
  "RUN_EXPORT_NOT_AVAILABLE",
@@ -11739,14 +11770,14 @@ ${commands.join("\n")}`,
11739
11770
  summary: options.summary
11740
11771
  });
11741
11772
  } catch (error) {
11742
- if (error instanceof _chunkSQWET4SLjs.DeeplineError && (error.code === "RUN_EXPORT_SCOPE_MISMATCH" || error.code === "RUN_EXPORT_NOT_READY")) {
11773
+ if (error instanceof _chunkBBTKAASQjs.DeeplineError && (error.code === "RUN_EXPORT_SCOPE_MISMATCH" || error.code === "RUN_EXPORT_NOT_READY")) {
11743
11774
  throw error;
11744
11775
  }
11745
11776
  if (!canExportPreview) {
11746
11777
  throw error;
11747
11778
  }
11748
11779
  }
11749
- if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _451 => _451.complete])) {
11780
+ if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _453 => _453.complete])) {
11750
11781
  const guarded2 = assertDatasetHasExportableRows({
11751
11782
  rowsInfo: fetchedRowsInfo,
11752
11783
  status,
@@ -11780,7 +11811,7 @@ ${commands.join("\n")}`,
11780
11811
  const previewReason = rowsInfo.currentTable ? "Legacy shared-table metadata does not prove this preview belongs to the run" : `Run output only includes ${rowsInfo.rows.length} preview row(s) of ${rowsInfo.totalRows}`;
11781
11812
  const activeRun = !TERMINAL_PLAY_STATUSES.has(status.status);
11782
11813
  const waitCommand = `${retryCommand} --wait`;
11783
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
11814
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
11784
11815
  `${previewReason}; the backing dataset was not ready to export yet. ` + (activeRun ? `The run is ${status.status}. Wait for this same run: ${waitCommand}. Do not rerun the Play to retrieve results.` : `Retry with: ${retryCommand}`),
11785
11816
  void 0,
11786
11817
  "RUN_EXPORT_NOT_READY",
@@ -11808,10 +11839,10 @@ ${commands.join("\n")}`,
11808
11839
  return writeExport(guarded);
11809
11840
  }
11810
11841
  function extractActiveRunsFromError(error) {
11811
- if (!(error instanceof _chunkSQWET4SLjs.DeeplineError)) {
11842
+ if (!(error instanceof _chunkBBTKAASQjs.DeeplineError)) {
11812
11843
  return [];
11813
11844
  }
11814
- const response = _optionalChain([error, 'access', _452 => _452.details, 'optionalAccess', _453 => _453.response]);
11845
+ const response = _optionalChain([error, 'access', _454 => _454.details, 'optionalAccess', _455 => _455.response]);
11815
11846
  if (!response || typeof response !== "object" || Array.isArray(response)) {
11816
11847
  return [];
11817
11848
  }
@@ -11857,7 +11888,7 @@ function stringArrayField(record4, key) {
11857
11888
  return value.filter((entry) => typeof entry === "string");
11858
11889
  }
11859
11890
  function extractPlayValidationErrors(value) {
11860
- if (value instanceof _chunkSQWET4SLjs.DeeplineError) {
11891
+ if (value instanceof _chunkBBTKAASQjs.DeeplineError) {
11861
11892
  return extractPlayValidationErrors(value.details);
11862
11893
  }
11863
11894
  if (!isRecord2(value)) {
@@ -11896,21 +11927,21 @@ function normalizePlayValidationError(error) {
11896
11927
  if (!message.trim()) {
11897
11928
  return error;
11898
11929
  }
11899
- return new (0, _chunkSQWET4SLjs.DeeplineError)(
11930
+ return new (0, _chunkBBTKAASQjs.DeeplineError)(
11900
11931
  message,
11901
- error instanceof _chunkSQWET4SLjs.DeeplineError ? error.statusCode : void 0,
11902
- error instanceof _chunkSQWET4SLjs.DeeplineError ? error.code : "PLAY_VALIDATION_ERROR",
11903
- error instanceof _chunkSQWET4SLjs.DeeplineError ? error.details : void 0
11932
+ error instanceof _chunkBBTKAASQjs.DeeplineError ? error.statusCode : void 0,
11933
+ error instanceof _chunkBBTKAASQjs.DeeplineError ? error.code : "PLAY_VALIDATION_ERROR",
11934
+ error instanceof _chunkBBTKAASQjs.DeeplineError ? error.details : void 0
11904
11935
  );
11905
11936
  }
11906
11937
  async function normalizePlayStartError(client, error, playName, options = {}) {
11907
11938
  const activeRuns = extractActiveRunsFromError(error);
11908
11939
  if (activeRuns.length > 0) {
11909
- return new (0, _chunkSQWET4SLjs.DeeplineError)(
11940
+ return new (0, _chunkBBTKAASQjs.DeeplineError)(
11910
11941
  formatActiveRunConflictError({ playName, activeRuns }),
11911
- error instanceof _chunkSQWET4SLjs.DeeplineError ? error.statusCode : 409,
11942
+ error instanceof _chunkBBTKAASQjs.DeeplineError ? error.statusCode : 409,
11912
11943
  "ACTIVE_RUN_EXISTS",
11913
- error instanceof _chunkSQWET4SLjs.DeeplineError ? error.details : void 0
11944
+ error instanceof _chunkBBTKAASQjs.DeeplineError ? error.details : void 0
11914
11945
  );
11915
11946
  }
11916
11947
  if (options.suggestMissingPlay && await isMissingRunPlayReferenceError({ client, error, playName })) {
@@ -11928,8 +11959,8 @@ function renderServerResultView(value) {
11928
11959
  return { lines: [], actions: [] };
11929
11960
  }
11930
11961
  const view = value;
11931
- const renderedSections = Array.isArray(_optionalChain([view, 'access', _454 => _454.render, 'optionalAccess', _455 => _455.sections])) ? view.render.sections : [];
11932
- const renderedActions = Array.isArray(_optionalChain([view, 'access', _456 => _456.render, 'optionalAccess', _457 => _457.actions])) ? view.render.actions : [];
11962
+ const renderedSections = Array.isArray(_optionalChain([view, 'access', _456 => _456.render, 'optionalAccess', _457 => _457.sections])) ? view.render.sections : [];
11963
+ const renderedActions = Array.isArray(_optionalChain([view, 'access', _458 => _458.render, 'optionalAccess', _459 => _459.actions])) ? view.render.actions : [];
11933
11964
  if (renderedSections.length > 0 || renderedActions.length > 0) {
11934
11965
  const lines2 = [];
11935
11966
  for (const section of renderedSections) {
@@ -11967,7 +11998,7 @@ function renderServerResultView(value) {
11967
11998
  }
11968
11999
  const tables = Array.isArray(view.tables) ? view.tables : [];
11969
12000
  const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
11970
- if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _458 => _458.queryCommand]) === "string") {
12001
+ if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _460 => _460.queryCommand]) === "string") {
11971
12002
  lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
11972
12003
  }
11973
12004
  if (tables.length > 0) {
@@ -12014,7 +12045,7 @@ function renderServerResultView(value) {
12014
12045
  function writeStartedPlayRun(input) {
12015
12046
  if (input.package && isPlayRunPackageValue(input.package)) {
12016
12047
  const run = input.package.run;
12017
- _chunkV7SCRUFQjs.recordPlayTermination.call(void 0, {
12048
+ _chunkKWYGWO4Yjs.recordPlayTermination.call(void 0, {
12018
12049
  id: run.id,
12019
12050
  status: run.status,
12020
12051
  finishedAt: run.finishedAt
@@ -12027,7 +12058,7 @@ function writeStartedPlayRun(input) {
12027
12058
  dashboardUrl: input.dashboardUrl,
12028
12059
  package: input.package
12029
12060
  };
12030
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
12061
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
12031
12062
  json: true,
12032
12063
  fields: input.jsonFields
12033
12064
  });
@@ -12049,7 +12080,7 @@ function writeStartedPlayRun(input) {
12049
12080
  input.progress.writeLine(output2, process.stdout);
12050
12081
  return;
12051
12082
  }
12052
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, input.package, {
12083
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, input.package, {
12053
12084
  json: false,
12054
12085
  text: `${output2}
12055
12086
  `
@@ -12084,7 +12115,7 @@ function writeStartedPlayRun(input) {
12084
12115
  ) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
12085
12116
  ];
12086
12117
  if (input.jsonOutput) {
12087
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
12118
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
12088
12119
  return;
12089
12120
  }
12090
12121
  const output = lines.join("\n");
@@ -12092,7 +12123,7 @@ function writeStartedPlayRun(input) {
12092
12123
  input.progress.writeLine(output, process.stdout);
12093
12124
  return;
12094
12125
  }
12095
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
12126
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
12096
12127
  {
12097
12128
  ...payload,
12098
12129
  render: { sections: [{ title: "play run", lines }] }
@@ -12102,7 +12133,7 @@ function writeStartedPlayRun(input) {
12102
12133
  );
12103
12134
  }
12104
12135
  function parsePlayCheckOptions(args) {
12105
- const selection = _chunkEGTUOYYGjs.parseJsonFields.call(void 0, args, "check");
12136
+ const selection = _chunkLN6RXDTBjs.parseJsonFields.call(void 0, args, "check");
12106
12137
  args = selection.args;
12107
12138
  const target = args[0];
12108
12139
  if (!target || target.startsWith("-")) {
@@ -12114,7 +12145,7 @@ function parsePlayCheckOptions(args) {
12114
12145
  if (arg !== "--json" && arg !== "--full")
12115
12146
  throw new Error(`Unknown plays check option: ${arg}`);
12116
12147
  }
12117
- const jsonOutput = _chunkEGTUOYYGjs.argsWantJson.call(void 0, args);
12148
+ const jsonOutput = _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
12118
12149
  return {
12119
12150
  target,
12120
12151
  jsonOutput,
@@ -12190,10 +12221,10 @@ ${PLAY_PUBLISH_USAGE}`
12190
12221
  useLatest,
12191
12222
  expectedArtifactHash,
12192
12223
  dryRun,
12193
- jsonOutput: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args)
12224
+ jsonOutput: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args)
12194
12225
  };
12195
12226
  }
12196
- var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
12227
+ var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--watch-play <play-reference>] [--dry-run] [--json]\nUse --watch-play to show invalid source on your own open working canvas while keeping the last valid diagram.";
12197
12228
  function parsePlaySaveOptions(args) {
12198
12229
  const target = args[0];
12199
12230
  if (!target) throw new Error(PLAY_SAVE_USAGE);
@@ -12202,9 +12233,16 @@ function parsePlaySaveOptions(args) {
12202
12233
  The Play file is positional.`);
12203
12234
  }
12204
12235
  let expectedArtifactHash;
12236
+ let watchPlay;
12205
12237
  let dryRun = false;
12206
12238
  for (let index = 1; index < args.length; index += 1) {
12207
12239
  const arg = args[index];
12240
+ if (arg === "--watch-play" || arg.startsWith("--watch-play=")) {
12241
+ watchPlay = arg === "--watch-play" ? args[++index] : arg.slice("--watch-play=".length);
12242
+ if (!watchPlay || watchPlay.startsWith("-"))
12243
+ throw new Error("--watch-play requires an existing Play reference.");
12244
+ continue;
12245
+ }
12208
12246
  if (arg === "--expected-artifact") {
12209
12247
  expectedArtifactHash = args[++index];
12210
12248
  if (!expectedArtifactHash) {
@@ -12230,8 +12268,9 @@ ${PLAY_SAVE_USAGE}`);
12230
12268
  return {
12231
12269
  target,
12232
12270
  expectedArtifactHash,
12271
+ watchPlay,
12233
12272
  dryRun,
12234
- jsonOutput: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args)
12273
+ jsonOutput: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args)
12235
12274
  };
12236
12275
  }
12237
12276
  function printScheduledPlayCapacity(capacity) {
@@ -12284,7 +12323,7 @@ function checkHintExpression(value) {
12284
12323
  return stringValue2(value).replace(/^toolExecutionResult\./, "result.");
12285
12324
  }
12286
12325
  function checkHintRawPath(value) {
12287
- return _optionalChain([value, 'optionalAccess', _459 => _459.startsWith, 'call', _460 => _460("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
12326
+ return _optionalChain([value, 'optionalAccess', _461 => _461.startsWith, 'call', _462 => _462("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
12288
12327
  }
12289
12328
  function collectStaticPipelineToolIds(staticPipeline) {
12290
12329
  const seen = /* @__PURE__ */ new Set();
@@ -12359,30 +12398,30 @@ function cronExecutionLabel(status) {
12359
12398
  }
12360
12399
  function readLiveCronMetadata(play) {
12361
12400
  const record4 = readRecord(play);
12362
- const metadata = readRecord(_optionalChain([record4, 'optionalAccess', _461 => _461.triggerMetadata]));
12401
+ const metadata = readRecord(_optionalChain([record4, 'optionalAccess', _463 => _463.triggerMetadata]));
12363
12402
  return {
12364
- schedule: typeof _optionalChain([metadata, 'optionalAccess', _462 => _462.cronSchedule]) === "string" ? metadata.cronSchedule : null,
12365
- timezone: typeof _optionalChain([metadata, 'optionalAccess', _463 => _463.cronTimezone]) === "string" ? metadata.cronTimezone : null,
12366
- nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _464 => _464.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
12367
- blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _465 => _465.blockedAt]) === "number" ? metadata.blockedAt : null,
12368
- blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _466 => _466.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
12403
+ schedule: typeof _optionalChain([metadata, 'optionalAccess', _464 => _464.cronSchedule]) === "string" ? metadata.cronSchedule : null,
12404
+ timezone: typeof _optionalChain([metadata, 'optionalAccess', _465 => _465.cronTimezone]) === "string" ? metadata.cronTimezone : null,
12405
+ nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _466 => _466.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
12406
+ blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _467 => _467.blockedAt]) === "number" ? metadata.blockedAt : null,
12407
+ blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _468 => _468.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
12369
12408
  };
12370
12409
  }
12371
12410
  function liveTriggerStatusLines(status, play) {
12372
12411
  const cron = readLiveCronMetadata(play);
12373
- if (!_optionalChain([status, 'optionalAccess', _467 => _467.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _468 => _468.webhook])) return [];
12412
+ if (!_optionalChain([status, 'optionalAccess', _469 => _469.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _470 => _470.webhook])) return [];
12374
12413
  const lines = [];
12375
- if (_optionalChain([status, 'optionalAccess', _469 => _469.cron]) || cron.schedule) {
12414
+ if (_optionalChain([status, 'optionalAccess', _471 => _471.cron]) || cron.schedule) {
12376
12415
  const timezone = cron.timezone ? ` (${cron.timezone})` : "";
12377
12416
  lines.push(
12378
- ` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _470 => _470.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
12417
+ ` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _472 => _472.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
12379
12418
  );
12380
- if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _471 => _471.cron]) === "active") {
12419
+ if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _473 => _473.cron]) === "active") {
12381
12420
  lines.push(
12382
12421
  ` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
12383
12422
  );
12384
12423
  }
12385
- if (_optionalChain([status, 'optionalAccess', _472 => _472.blockedReason])) {
12424
+ if (_optionalChain([status, 'optionalAccess', _474 => _474.blockedReason])) {
12386
12425
  lines.push(` Schedule issue: ${status.blockedReason}`);
12387
12426
  if (status.blockedReasonCode || cron.blockedReasonCode) {
12388
12427
  lines.push(
@@ -12398,7 +12437,7 @@ function liveTriggerStatusLines(status, play) {
12398
12437
  );
12399
12438
  }
12400
12439
  }
12401
- if (_optionalChain([status, 'optionalAccess', _473 => _473.webhook])) {
12440
+ if (_optionalChain([status, 'optionalAccess', _475 => _475.webhook])) {
12402
12441
  lines.push(` Webhook: ${status.webhook}`);
12403
12442
  }
12404
12443
  return lines;
@@ -12406,11 +12445,11 @@ function liveTriggerStatusLines(status, play) {
12406
12445
  function triggerStatusFromMetadata(value) {
12407
12446
  const metadata = readRecord(value);
12408
12447
  return {
12409
- cron: typeof _optionalChain([metadata, 'optionalAccess', _474 => _474.cronStatus]) === "string" ? metadata.cronStatus : null,
12410
- webhook: typeof _optionalChain([metadata, 'optionalAccess', _475 => _475.webhookStatus]) === "string" ? metadata.webhookStatus : null,
12411
- blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _476 => _476.blockedReason]) === "string" ? metadata.blockedReason : null,
12412
- blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _477 => _477.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
12413
- blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _478 => _478.blockedAt]) === "number" ? metadata.blockedAt : null
12448
+ cron: typeof _optionalChain([metadata, 'optionalAccess', _476 => _476.cronStatus]) === "string" ? metadata.cronStatus : null,
12449
+ webhook: typeof _optionalChain([metadata, 'optionalAccess', _477 => _477.webhookStatus]) === "string" ? metadata.webhookStatus : null,
12450
+ blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _478 => _478.blockedReason]) === "string" ? metadata.blockedReason : null,
12451
+ blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _479 => _479.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
12452
+ blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _480 => _480.blockedAt]) === "number" ? metadata.blockedAt : null
12414
12453
  };
12415
12454
  }
12416
12455
  function printPublishReceipt(input) {
@@ -12442,7 +12481,7 @@ function printBundledRuntimeWarning(bundle) {
12442
12481
  async function handlePlayCheck(args) {
12443
12482
  const options = parsePlayCheckOptions(args);
12444
12483
  if (!isFileTarget(options.target)) {
12445
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
12484
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
12446
12485
  try {
12447
12486
  await assertCanonicalNamedPlayReference(client, options.target, {
12448
12487
  command: "check"
@@ -12471,7 +12510,7 @@ async function handlePlayCheck(args) {
12471
12510
  },
12472
12511
  ...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
12473
12512
  };
12474
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, result, {
12513
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, result, {
12475
12514
  json: options.jsonOutput,
12476
12515
  fields: options.jsonFields,
12477
12516
  text: renderPlayCheckOutput(result) + "\n"
@@ -12481,7 +12520,7 @@ async function handlePlayCheck(args) {
12481
12520
  const resolved = _path.resolve.call(void 0, options.target);
12482
12521
  const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
12483
12522
  if (options.jsonOutput) {
12484
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
12523
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
12485
12524
  {
12486
12525
  kind: "play_check",
12487
12526
  checked: "named_contract",
@@ -12510,9 +12549,9 @@ async function handlePlayCheck(args) {
12510
12549
  target: options.target,
12511
12550
  full: options.full,
12512
12551
  detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
12513
- publishCommand: _optionalChain([primary, 'optionalAccess', _479 => _479.result, 'access', _480 => _480.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
12552
+ publishCommand: _optionalChain([primary, 'optionalAccess', _481 => _481.result, 'access', _482 => _482.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
12514
12553
  });
12515
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, output, {
12554
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, output, {
12516
12555
  json: options.jsonOutput,
12517
12556
  fields: options.jsonFields,
12518
12557
  text: renderPlayCheckOutput(output) + "\n"
@@ -12525,7 +12564,7 @@ function resolvePlayCheckExportNames(sourceCode) {
12525
12564
  return exports.map((entry) => entry.name);
12526
12565
  }
12527
12566
  function artifactForProductionCompatibilityCheck(artifact) {
12528
- const rawEdition = _optionalChain([process, 'access', _481 => _481.env, 'access', _482 => _482.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _483 => _483.trim, 'call', _484 => _484()]);
12567
+ const rawEdition = _optionalChain([process, 'access', _483 => _483.env, 'access', _484 => _484.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _485 => _485.trim, 'call', _486 => _486()]);
12529
12568
  if (!rawEdition) return artifact;
12530
12569
  if (!/^\d+$/.test(rawEdition)) {
12531
12570
  throw new Error(
@@ -12580,7 +12619,7 @@ async function checkOneExportedPlay(input) {
12580
12619
  }
12581
12620
  const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
12582
12621
  const authoringErrors = collectPlayGraphAuthoringErrors(graph);
12583
- const client = _nullishCoalesce(input.client, () => ( new (0, _chunkMQX363YFjs.DeeplineClient)()));
12622
+ const client = _nullishCoalesce(input.client, () => ( new (0, _chunkXBAH3TKUjs.DeeplineClient)()));
12584
12623
  const integrationMode = resolveEvalIntegrationMode();
12585
12624
  const checked = await checkLocalPlayGraph({
12586
12625
  client,
@@ -12590,7 +12629,7 @@ async function checkOneExportedPlay(input) {
12590
12629
  integrationMode,
12591
12630
  prepareArtifact: artifactForProductionCompatibilityCheck
12592
12631
  });
12593
- const importedPlayName = _optionalChain([checked, 'access', _485 => _485.failedChild, 'optionalAccess', _486 => _486.playName]);
12632
+ const importedPlayName = _optionalChain([checked, 'access', _487 => _487.failedChild, 'optionalAccess', _488 => _488.playName]);
12594
12633
  const diagnosticPrefix = importedPlayName ? `Imported Play ${importedPlayName}: ` : "";
12595
12634
  const valid = checked.result.valid && !checked.failedChild && authoringErrors.length === 0;
12596
12635
  const errors = [
@@ -12606,7 +12645,7 @@ async function checkOneExportedPlay(input) {
12606
12645
  valid,
12607
12646
  errors: valid ? checked.result.errors : addPlayCheckRepairHints({
12608
12647
  errors,
12609
- sourceCode: _nullishCoalesce(_optionalChain([checked, 'access', _487 => _487.failedChild, 'optionalAccess', _488 => _488.sourceCode]), () => ( graph.root.sourceCode))
12648
+ sourceCode: _nullishCoalesce(_optionalChain([checked, 'access', _489 => _489.failedChild, 'optionalAccess', _490 => _490.sourceCode]), () => ( graph.root.sourceCode))
12610
12649
  }),
12611
12650
  ...checked.failedChild && checked.result.issues ? {
12612
12651
  issues: checked.result.issues.map((issue) => ({
@@ -12636,9 +12675,9 @@ async function handleFileBackedRun(options, hooks) {
12636
12675
  let prefetchClient;
12637
12676
  let admissionCapability;
12638
12677
  let cancelAdmissionCapability;
12639
- let cliAdmission = _chunkHPJAE6PPjs.usesCliPlayAdmission.call(void 0, "plays run", process.argv.slice(2));
12640
- const progress = _nullishCoalesce(_chunk6CEUQYMBjs.getActiveCliProgress.call(void 0, ), () => ( _chunk6CEUQYMBjs.createCliProgress.call(void 0, !options.jsonOutput)));
12641
- const reportError = _nullishCoalesce(_optionalChain([hooks, 'optionalAccess', _489 => _489.writeDryRunError]), () => ( ((error) => console.error(error instanceof Error ? error.message : String(error)))));
12678
+ let cliAdmission = _chunkZZ4MF2GIjs.usesCliPlayAdmission.call(void 0, "plays run", process.argv.slice(2));
12679
+ const progress = _nullishCoalesce(_chunkHWDKRN7Ljs.getActiveCliProgress.call(void 0, ), () => ( _chunkHWDKRN7Ljs.createCliProgress.call(void 0, !options.jsonOutput)));
12680
+ const reportError = _nullishCoalesce(_optionalChain([hooks, 'optionalAccess', _491 => _491.writeDryRunError]), () => ( ((error) => console.error(error instanceof Error ? error.message : String(error)))));
12642
12681
  const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
12643
12682
  progress.phase("compiling play");
12644
12683
  const sourceCode = traceCliSync(
@@ -12654,11 +12693,11 @@ async function handleFileBackedRun(options, hooks) {
12654
12693
  return 1;
12655
12694
  }
12656
12695
  if (!options.dryRun && options.watch && cliAdmission && Boolean(options.runIdFile) && options.maxTotalCredits === null && !inputContainsLocalFilePath(runtimeInput)) {
12657
- const clientForPrefetch = new (0, _chunkMQX363YFjs.DeeplineClient)(playRunClientOptions(options));
12696
+ const clientForPrefetch = new (0, _chunkXBAH3TKUjs.DeeplineClient)(playRunClientOptions(options));
12658
12697
  prefetchClient = clientForPrefetch;
12659
12698
  const capabilityController = new AbortController();
12660
12699
  cancelAdmissionCapability = () => capabilityController.abort();
12661
- admissionCapability = _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
12700
+ admissionCapability = _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
12662
12701
  "cli.play_admission_capability_prefetch",
12663
12702
  { targetKind: "file" },
12664
12703
  () => clientForPrefetch.prefetchPlayRunAdmissionCapability({
@@ -12669,7 +12708,7 @@ async function handleFileBackedRun(options, hooks) {
12669
12708
  }
12670
12709
  let graph;
12671
12710
  try {
12672
- graph = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
12711
+ graph = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
12673
12712
  "cli.play_file_bundle_graph",
12674
12713
  { targetKind: "file" },
12675
12714
  () => collectBundledPlayGraph(
@@ -12682,10 +12721,10 @@ async function handleFileBackedRun(options, hooks) {
12682
12721
  assertPlayGraphAuthoring(graph);
12683
12722
  if (options.dryRun) {
12684
12723
  progress.complete();
12685
- const plan = _chunkJBBJDFUJjs.planLocalPlayExecution.call(void 0, graph, {
12724
+ const plan = _chunk6VUGBQZQjs.planLocalPlayExecution.call(void 0, graph, {
12686
12725
  runIdFile: options.runIdFile
12687
12726
  });
12688
- if (_optionalChain([hooks, 'optionalAccess', _490 => _490.writeDryRunPlan])) hooks.writeDryRunPlan(plan);
12727
+ if (_optionalChain([hooks, 'optionalAccess', _492 => _492.writeDryRunPlan])) hooks.writeDryRunPlan(plan);
12689
12728
  else
12690
12729
  renderLocalPlayExecutionPlan(plan, {
12691
12730
  dryRun: true,
@@ -12693,9 +12732,9 @@ async function handleFileBackedRun(options, hooks) {
12693
12732
  });
12694
12733
  return 0;
12695
12734
  }
12696
- client = _nullishCoalesce(prefetchClient, () => ( new (0, _chunkMQX363YFjs.DeeplineClient)(playRunClientOptions(options))));
12735
+ client = _nullishCoalesce(prefetchClient, () => ( new (0, _chunkXBAH3TKUjs.DeeplineClient)(playRunClientOptions(options))));
12697
12736
  if (cliAdmission && (graph.root.importedPlayDependencies.length > 0 || inputContainsLocalFilePath(runtimeInput))) {
12698
- await _chunkHPJAE6PPjs.checkPlayRunCompatibility.call(void 0,
12737
+ await _chunkZZ4MF2GIjs.checkPlayRunCompatibility.call(void 0,
12699
12738
  client.baseUrl,
12700
12739
  options.maintenancePolicy
12701
12740
  );
@@ -12706,9 +12745,9 @@ async function handleFileBackedRun(options, hooks) {
12706
12745
  playName: await _asyncNullishCoalesce(graph.root.playName, async () => ( await extractPlayName(sourceCode, absolutePlayPath))),
12707
12746
  maxTotalCredits: options.maxTotalCredits
12708
12747
  });
12709
- const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
12748
+ const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput) && !mayBindBareFileName(graph.root, runtimeInput);
12710
12749
  if (canDeferCompilerManifest) {
12711
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
12750
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
12712
12751
  phase: "cli.play_file_compile_manifests",
12713
12752
  ms: 0,
12714
12753
  ok: true,
@@ -12717,7 +12756,7 @@ async function handleFileBackedRun(options, hooks) {
12717
12756
  reason: "validated_by_run_route"
12718
12757
  });
12719
12758
  } else {
12720
- await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
12759
+ await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
12721
12760
  "cli.play_file_compile_manifests",
12722
12761
  { targetKind: "file", skipped: false },
12723
12762
  () => compileBundledPlayGraphManifests(client, graph)
@@ -12725,7 +12764,7 @@ async function handleFileBackedRun(options, hooks) {
12725
12764
  }
12726
12765
  progress.phase("compiled play");
12727
12766
  } catch (error) {
12728
- if (error instanceof _chunkV7SCRUFQjs.ExecutionOutputError) throw error;
12767
+ if (error instanceof _chunkKWYGWO4Yjs.ExecutionOutputError) throw error;
12729
12768
  progress.fail();
12730
12769
  reportError(normalizePlayValidationError(error));
12731
12770
  return 1;
@@ -12736,13 +12775,13 @@ async function handleFileBackedRun(options, hooks) {
12736
12775
  if (bundleResult.importedPlayDependencies.length > 0) {
12737
12776
  try {
12738
12777
  renderLocalPlayExecutionPlan(
12739
- _chunkJBBJDFUJjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
12778
+ _chunk6VUGBQZQjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
12740
12779
  );
12741
12780
  progress.phase("pinning imported plays");
12742
- graph = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
12781
+ graph = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
12743
12782
  "cli.play_file_pin_imports",
12744
12783
  { targetKind: "file" },
12745
- () => _chunkJBBJDFUJjs.pinLocalPlayImports.call(void 0, client, graph)
12784
+ () => _chunk6VUGBQZQjs.pinLocalPlayImports.call(void 0, client, graph)
12746
12785
  );
12747
12786
  bundleResult = graph.root;
12748
12787
  } catch (error) {
@@ -12755,11 +12794,11 @@ async function handleFileBackedRun(options, hooks) {
12755
12794
  (file) => stageFile(file.logicalPath, file.absolutePath)
12756
12795
  );
12757
12796
  const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
12758
- const fileInputBindings = _chunk2KHUFWTKjs.playRunFileInputBindings.call(void 0, {
12759
- inputSchema: _optionalChain([compilerManifest, 'optionalAccess', _491 => _491.authoringContract, 'optionalAccess', _492 => _492.inputSchema]),
12760
- staticPipeline: _optionalChain([compilerManifest, 'optionalAccess', _493 => _493.staticPipeline])
12797
+ const fileInputBindings = _chunkCQDQNZGHjs.playRunFileInputBindings.call(void 0, {
12798
+ inputSchema: _optionalChain([compilerManifest, 'optionalAccess', _493 => _493.authoringContract, 'optionalAccess', _494 => _494.inputSchema]),
12799
+ staticPipeline: _optionalChain([compilerManifest, 'optionalAccess', _495 => _495.staticPipeline])
12761
12800
  });
12762
- const stagedFileInputs = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
12801
+ const stagedFileInputs = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
12763
12802
  "cli.play_stage_inputs",
12764
12803
  {
12765
12804
  targetKind: "file",
@@ -12769,7 +12808,10 @@ async function handleFileBackedRun(options, hooks) {
12769
12808
  client,
12770
12809
  runtimeInput,
12771
12810
  bindings: fileInputBindings,
12772
- progress
12811
+ progress,
12812
+ packagedFiles: new Set(
12813
+ bundleResult.packagedFiles.map((file) => file.logicalPath)
12814
+ )
12773
12815
  })
12774
12816
  );
12775
12817
  const integrationMode = resolveEvalIntegrationMode();
@@ -12806,7 +12848,7 @@ async function handleFileBackedRun(options, hooks) {
12806
12848
  };
12807
12849
  if (options.watch) {
12808
12850
  progress.phase("starting run");
12809
- const finalStatus = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
12851
+ const finalStatus = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
12810
12852
  "cli.play_start_watch",
12811
12853
  { targetKind: "file", playName },
12812
12854
  () => (options.runIdFile ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
@@ -12820,9 +12862,9 @@ async function handleFileBackedRun(options, hooks) {
12820
12862
  waitTimeoutMs: options.waitTimeoutMs,
12821
12863
  open: options.open,
12822
12864
  progress,
12823
- onRunStarted: _optionalChain([hooks, 'optionalAccess', _494 => _494.onRunStarted]),
12824
- onSubmission: _optionalChain([hooks, 'optionalAccess', _495 => _495.onSubmission]),
12825
- onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _496 => _496.onRunAdmitted]),
12865
+ onRunStarted: _optionalChain([hooks, 'optionalAccess', _496 => _496.onRunStarted]),
12866
+ onSubmission: _optionalChain([hooks, 'optionalAccess', _497 => _497.onSubmission]),
12867
+ onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _498 => _498.onRunAdmitted]),
12826
12868
  maintenancePolicy: options.maintenancePolicy,
12827
12869
  ...!options.runIdFile || options.fullJson ? { fullJson: options.fullJson } : {},
12828
12870
  ...cliAdmission ? {
@@ -12852,8 +12894,8 @@ async function handleFileBackedRun(options, hooks) {
12852
12894
  ),
12853
12895
  options
12854
12896
  );
12855
- _optionalChain([hooks, 'optionalAccess', _497 => _497.onTerminalStatus, 'optionalCall', _498 => _498(outputStatus)]);
12856
- if (_optionalChain([hooks, 'optionalAccess', _499 => _499.writeResult])) {
12897
+ _optionalChain([hooks, 'optionalAccess', _499 => _499.onTerminalStatus, 'optionalCall', _500 => _500(outputStatus)]);
12898
+ if (_optionalChain([hooks, 'optionalAccess', _501 => _501.writeResult])) {
12857
12899
  await hooks.writeResult(client, outputStatus);
12858
12900
  return outputStatus.status === "completed" ? 0 : 1;
12859
12901
  }
@@ -12868,15 +12910,15 @@ async function handleFileBackedRun(options, hooks) {
12868
12910
  return outputStatus.status === "completed" ? 0 : 1;
12869
12911
  }
12870
12912
  progress.phase("starting run");
12871
- const started = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
12913
+ const started = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
12872
12914
  "cli.play_start_unwatched",
12873
12915
  { targetKind: "file", playName },
12874
- () => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _500 => _500.onSubmission]) }).catch(async (error) => {
12916
+ () => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _502 => _502.onSubmission]) }).catch(async (error) => {
12875
12917
  throw await normalizePlayStartError(client, error, playName);
12876
12918
  })
12877
12919
  );
12878
- await _optionalChain([hooks, 'optionalAccess', _501 => _501.onRunStarted, 'optionalCall', _502 => _502(started.workflowId)]);
12879
- await _optionalChain([hooks, 'optionalAccess', _503 => _503.onRunAdmitted, 'optionalCall', _504 => _504(started.workflowId)]);
12920
+ await _optionalChain([hooks, 'optionalAccess', _503 => _503.onRunStarted, 'optionalCall', _504 => _504(started.workflowId)]);
12921
+ await _optionalChain([hooks, 'optionalAccess', _505 => _505.onRunAdmitted, 'optionalCall', _506 => _506(started.workflowId)]);
12880
12922
  const resolvedDashboardUrl = _chunkXYIECA7Mjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
12881
12923
  openPlayDashboard(
12882
12924
  resolvePlayRunUrl({
@@ -12888,7 +12930,7 @@ async function handleFileBackedRun(options, hooks) {
12888
12930
  );
12889
12931
  progress.phase("started run");
12890
12932
  progress.complete();
12891
- if (_optionalChain([hooks, 'optionalAccess', _505 => _505.writeStarted])) {
12933
+ if (_optionalChain([hooks, 'optionalAccess', _507 => _507.writeStarted])) {
12892
12934
  hooks.writeStarted(
12893
12935
  started.workflowId,
12894
12936
  _nullishCoalesce(started.status, () => ( "started")),
@@ -12923,7 +12965,7 @@ async function resolveNamedRunRevisionId(input) {
12923
12965
  if (input.selector === "latest") {
12924
12966
  const versions = await input.client.listPlayVersions(input.playName);
12925
12967
  const latest = versions[0];
12926
- if (!_optionalChain([latest, 'optionalAccess', _506 => _506._id])) {
12968
+ if (!_optionalChain([latest, 'optionalAccess', _508 => _508._id])) {
12927
12969
  throw new Error(`No saved revisions found for ${input.playName}.`);
12928
12970
  }
12929
12971
  return latest._id;
@@ -12934,9 +12976,9 @@ async function handleNamedRun(options, hooks) {
12934
12976
  if (options.target.kind !== "name") {
12935
12977
  throw new Error("Expected a named play run target.");
12936
12978
  }
12937
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)(playRunClientOptions(options));
12938
- let cliAdmission = _chunkHPJAE6PPjs.usesCliPlayAdmission.call(void 0, "plays run", process.argv.slice(2));
12939
- const progress = _nullishCoalesce(_chunk6CEUQYMBjs.getActiveCliProgress.call(void 0, ), () => ( _chunk6CEUQYMBjs.createCliProgress.call(void 0, !options.jsonOutput)));
12979
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)(playRunClientOptions(options));
12980
+ let cliAdmission = _chunkZZ4MF2GIjs.usesCliPlayAdmission.call(void 0, "plays run", process.argv.slice(2));
12981
+ const progress = _nullishCoalesce(_chunkHWDKRN7Ljs.getActiveCliProgress.call(void 0, ), () => ( _chunkHWDKRN7Ljs.createCliProgress.call(void 0, !options.jsonOutput)));
12940
12982
  const playName = options.target.name;
12941
12983
  const runtimeInput = options.input ? { ...options.input } : {};
12942
12984
  try {
@@ -12954,7 +12996,7 @@ async function handleNamedRun(options, hooks) {
12954
12996
  if (options.watch && cliAdmission && Boolean(options.runIdFile) && options.maxTotalCredits === null && !needsPlayDefinition && !inputContainsLocalFilePath(runtimeInput)) {
12955
12997
  const capabilityController = new AbortController();
12956
12998
  cancelAdmissionCapability = () => capabilityController.abort();
12957
- admissionCapability = _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
12999
+ admissionCapability = _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
12958
13000
  "cli.play_admission_capability_prefetch",
12959
13001
  { targetKind: "name", playName },
12960
13002
  () => client.prefetchPlayRunAdmissionCapability({
@@ -12965,14 +13007,14 @@ async function handleNamedRun(options, hooks) {
12965
13007
  }
12966
13008
  const playDetail = needsPlayDefinition ? await (async () => {
12967
13009
  progress.phase("loading play definition");
12968
- return _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
13010
+ return _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
12969
13011
  "cli.play_load_definition",
12970
13012
  { targetKind: "name", playName, skipped: false },
12971
13013
  () => assertCanonicalNamedPlayReference(client, playName, {
12972
13014
  command: "run"
12973
13015
  })
12974
13016
  );
12975
- })() : (_chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
13017
+ })() : (_chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
12976
13018
  phase: "cli.play_load_definition",
12977
13019
  ms: 0,
12978
13020
  ok: true,
@@ -12981,7 +13023,7 @@ async function handleNamedRun(options, hooks) {
12981
13023
  skipped: true
12982
13024
  }), null);
12983
13025
  progress.phase("selecting revision");
12984
- const selectedRevisionId = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
13026
+ const selectedRevisionId = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
12985
13027
  "cli.play_select_revision",
12986
13028
  {
12987
13029
  targetKind: "name",
@@ -13002,14 +13044,14 @@ async function handleNamedRun(options, hooks) {
13002
13044
  maxTotalCredits: options.maxTotalCredits
13003
13045
  });
13004
13046
  const fileInputBindings = playDetail ? [
13005
- ..._chunk2KHUFWTKjs.fileInputBindingsFromPlaySchema.call(void 0, playDetail.play.inputSchema),
13006
- ..._chunk2KHUFWTKjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
13047
+ ..._chunkCQDQNZGHjs.fileInputBindingsFromPlaySchema.call(void 0, playDetail.play.inputSchema),
13048
+ ..._chunkCQDQNZGHjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
13007
13049
  ] : [];
13008
13050
  if (cliAdmission && fileInputBindings.length > 0) {
13009
- await _chunkHPJAE6PPjs.checkPlayRunCompatibility.call(void 0, client.baseUrl, options.maintenancePolicy);
13051
+ await _chunkZZ4MF2GIjs.checkPlayRunCompatibility.call(void 0, client.baseUrl, options.maintenancePolicy);
13010
13052
  cliAdmission = false;
13011
13053
  }
13012
- const stagedFileInputs = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
13054
+ const stagedFileInputs = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
13013
13055
  "cli.play_stage_inputs",
13014
13056
  {
13015
13057
  targetKind: "name",
@@ -13032,7 +13074,7 @@ async function handleNamedRun(options, hooks) {
13032
13074
  const testPolicyOverrides = {
13033
13075
  ...options.debugMapLatency ? { mapLatencyProfile: true } : {}
13034
13076
  };
13035
- const startRequest = _chunk2KHUFWTKjs.buildNamedPlayRunRequest.call(void 0, {
13077
+ const startRequest = _chunkCQDQNZGHjs.buildNamedPlayRunRequest.call(void 0, {
13036
13078
  name: playName,
13037
13079
  revisionId: selectedRevisionId,
13038
13080
  runtimeInput,
@@ -13053,7 +13095,7 @@ async function handleNamedRun(options, hooks) {
13053
13095
  });
13054
13096
  if (options.watch) {
13055
13097
  progress.phase("starting run");
13056
- const finalStatus = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
13098
+ const finalStatus = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
13057
13099
  "cli.play_start_watch",
13058
13100
  { targetKind: "name", playName },
13059
13101
  () => (options.runIdFile ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
@@ -13067,9 +13109,9 @@ async function handleNamedRun(options, hooks) {
13067
13109
  waitTimeoutMs: options.waitTimeoutMs,
13068
13110
  open: options.open,
13069
13111
  progress,
13070
- onRunStarted: _optionalChain([hooks, 'optionalAccess', _507 => _507.onRunStarted]),
13071
- onSubmission: _optionalChain([hooks, 'optionalAccess', _508 => _508.onSubmission]),
13072
- onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _509 => _509.onRunAdmitted]),
13112
+ onRunStarted: _optionalChain([hooks, 'optionalAccess', _509 => _509.onRunStarted]),
13113
+ onSubmission: _optionalChain([hooks, 'optionalAccess', _510 => _510.onSubmission]),
13114
+ onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _511 => _511.onRunAdmitted]),
13073
13115
  maintenancePolicy: options.maintenancePolicy,
13074
13116
  ...!options.runIdFile || options.fullJson ? { fullJson: options.fullJson } : {},
13075
13117
  ...cliAdmission ? {
@@ -13102,8 +13144,8 @@ async function handleNamedRun(options, hooks) {
13102
13144
  options,
13103
13145
  _nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
13104
13146
  );
13105
- _optionalChain([hooks, 'optionalAccess', _510 => _510.onTerminalStatus, 'optionalCall', _511 => _511(outputStatus)]);
13106
- if (_optionalChain([hooks, 'optionalAccess', _512 => _512.writeResult])) {
13147
+ _optionalChain([hooks, 'optionalAccess', _512 => _512.onTerminalStatus, 'optionalCall', _513 => _513(outputStatus)]);
13148
+ if (_optionalChain([hooks, 'optionalAccess', _514 => _514.writeResult])) {
13107
13149
  await hooks.writeResult(client, outputStatus);
13108
13150
  return outputStatus.status === "completed" ? 0 : 1;
13109
13151
  }
@@ -13118,17 +13160,17 @@ async function handleNamedRun(options, hooks) {
13118
13160
  return outputStatus.status === "completed" ? 0 : 1;
13119
13161
  }
13120
13162
  progress.phase("starting run");
13121
- const started = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
13163
+ const started = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
13122
13164
  "cli.play_start_unwatched",
13123
13165
  { targetKind: "name", playName },
13124
- () => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _513 => _513.onSubmission]) }).catch(async (error) => {
13166
+ () => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _515 => _515.onSubmission]) }).catch(async (error) => {
13125
13167
  throw await normalizePlayStartError(client, error, playName, {
13126
13168
  suggestMissingPlay: true
13127
13169
  });
13128
13170
  })
13129
13171
  );
13130
- await _optionalChain([hooks, 'optionalAccess', _514 => _514.onRunStarted, 'optionalCall', _515 => _515(started.workflowId)]);
13131
- await _optionalChain([hooks, 'optionalAccess', _516 => _516.onRunAdmitted, 'optionalCall', _517 => _517(started.workflowId)]);
13172
+ await _optionalChain([hooks, 'optionalAccess', _516 => _516.onRunStarted, 'optionalCall', _517 => _517(started.workflowId)]);
13173
+ await _optionalChain([hooks, 'optionalAccess', _518 => _518.onRunAdmitted, 'optionalCall', _519 => _519(started.workflowId)]);
13132
13174
  const resolvedDashboardUrl = _chunkXYIECA7Mjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
13133
13175
  openPlayDashboard(
13134
13176
  resolvePlayRunUrl({
@@ -13140,7 +13182,7 @@ async function handleNamedRun(options, hooks) {
13140
13182
  );
13141
13183
  progress.phase("started run");
13142
13184
  progress.complete();
13143
- if (_optionalChain([hooks, 'optionalAccess', _518 => _518.writeStarted])) {
13185
+ if (_optionalChain([hooks, 'optionalAccess', _520 => _520.writeStarted])) {
13144
13186
  hooks.writeStarted(
13145
13187
  started.workflowId,
13146
13188
  _nullishCoalesce(started.status, () => ( "started")),
@@ -13173,12 +13215,12 @@ async function writePlayRunReceipt(client, status, output) {
13173
13215
  const compact = compactPlayStatus(status);
13174
13216
  const errors = Array.isArray(compact.errors) ? compact.errors : [];
13175
13217
  const error = status.status === "failed" ? _nullishCoalesce(errors[0], () => ( {
13176
- message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access', _519 => _519.progress, 'optionalAccess', _520 => _520.error]))), () => ( "Play failed. Inspect the run for details."))
13218
+ message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access', _521 => _521.progress, 'optionalAccess', _522 => _522.error]))), () => ( "Play failed. Inspect the run for details."))
13177
13219
  })) : null;
13178
13220
  const next = { status: `deepline runs get ${status.runId}` };
13179
- const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access', _521 => _521.exec, 'call', _522 => _522(status.runId), 'optionalAccess', _523 => _523[1]]), () => ( extractRunPlayName(status))), () => ( null));
13221
+ const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access', _523 => _523.exec, 'call', _524 => _524(status.runId), 'optionalAccess', _525 => _525[1]]), () => ( extractRunPlayName(status))), () => ( null));
13180
13222
  if (!terminal) {
13181
- _chunkV7SCRUFQjs.writeExecutionOutput.call(void 0,
13223
+ _chunkKWYGWO4Yjs.writeExecutionOutput.call(void 0,
13182
13224
  {
13183
13225
  id: status.runId,
13184
13226
  status: status.status,
@@ -13206,11 +13248,11 @@ async function writePlayRunReceipt(client, status, output) {
13206
13248
  retryCommand: `deepline runs export ${status.runId}`
13207
13249
  }), async () => ( info));
13208
13250
  } catch (fetchError) {
13209
- if (!info.complete || info.currentTable || fetchError instanceof _chunkSQWET4SLjs.DeeplineError && fetchError.code === "RUN_EXPORT_SCOPE_MISMATCH")
13251
+ if (!info.complete || info.currentTable || fetchError instanceof _chunkBBTKAASQjs.DeeplineError && fetchError.code === "RUN_EXPORT_SCOPE_MISMATCH")
13210
13252
  throw fetchError;
13211
13253
  }
13212
13254
  if (!info.complete)
13213
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
13255
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
13214
13256
  `Dataset ${dataset.source} is incomplete. Export it with deepline runs export ${status.runId}; do not restart the run.`,
13215
13257
  void 0,
13216
13258
  "RUN_EXPORT_NOT_READY"
@@ -13242,11 +13284,11 @@ async function writePlayRunReceipt(client, status, output) {
13242
13284
  Object.entries(handle).filter(([key]) => source !== "result" || key !== "_metadata").map(([key, child]) => [key, materialize(child, `${source}.${key}`)])
13243
13285
  );
13244
13286
  };
13245
- const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call', _524 => _524(status), 'optionalAccess', _525 => _525.outputs]));
13287
+ const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call', _526 => _526(status), 'optionalAccess', _527 => _527.outputs]));
13246
13288
  const returned = status.result !== void 0 ? status.result : packagedOutputs ? Object.fromEntries(
13247
13289
  Object.entries(packagedOutputs).map(([key, value]) => [
13248
13290
  key,
13249
- _optionalChain([readRecord, 'call', _526 => _526(value), 'optionalAccess', _527 => _527.kind]) === "value" ? _optionalChain([readRecord, 'call', _528 => _528(value), 'optionalAccess', _529 => _529.value]) : value
13291
+ _optionalChain([readRecord, 'call', _528 => _528(value), 'optionalAccess', _529 => _529.kind]) === "value" ? _optionalChain([readRecord, 'call', _530 => _530(value), 'optionalAccess', _531 => _531.value]) : value
13250
13292
  ])
13251
13293
  ) : null;
13252
13294
  let data = materialize(returned);
@@ -13258,10 +13300,10 @@ async function writePlayRunReceipt(client, status, output) {
13258
13300
  };
13259
13301
  }
13260
13302
  const byRows = new Map(collections.map((c) => [c.rows, c]));
13261
- const allCollections = _chunkV7SCRUFQjs.outputCollections.call(void 0, data).map(
13303
+ const allCollections = _chunkKWYGWO4Yjs.outputCollections.call(void 0, data).map(
13262
13304
  (collection) => _nullishCoalesce(byRows.get(collection.rows), () => ( collection))
13263
13305
  );
13264
- _chunkV7SCRUFQjs.writeExecutionOutput.call(void 0,
13306
+ _chunkKWYGWO4Yjs.writeExecutionOutput.call(void 0,
13265
13307
  {
13266
13308
  id: status.runId,
13267
13309
  status: status.status,
@@ -13269,7 +13311,7 @@ async function writePlayRunReceipt(client, status, output) {
13269
13311
  ...allCollections.length ? { collections: allCollections } : {},
13270
13312
  complete: allCollections.every((c) => c.complete === true) ? true : allCollections.some((c) => c.complete === false) ? false : null,
13271
13313
  error,
13272
- credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access', _530 => _530.billing, 'optionalAccess', _531 => _531.totalCredits]))), () => ( null)),
13314
+ credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access', _532 => _532.billing, 'optionalAccess', _533 => _533.totalCredits]))), () => ( null)),
13273
13315
  ...playName ? { page: _chunkXYIECA7Mjs.buildPlayRunUrl.call(void 0, client.baseUrl, playName, status.runId) } : {},
13274
13316
  warnings: [
13275
13317
  ...buildRunWarnings(status, null),
@@ -13282,7 +13324,7 @@ async function writePlayRunReceipt(client, status, output) {
13282
13324
  }
13283
13325
  var TOOL_EXECUTION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
13284
13326
  async function handlePlayRun(args, hooks) {
13285
- const parsedOptions = Array.isArray(args) ? _chunkTVINIDHBjs.parsePlayRunOptions.call(void 0, args) : args;
13327
+ const parsedOptions = Array.isArray(args) ? _chunkY2NTPYGSjs.parsePlayRunOptions.call(void 0, args) : args;
13286
13328
  const options = parsedOptions.runIdFile ? {
13287
13329
  ...parsedOptions,
13288
13330
  runIdFile: parsedOptions.dryRun ? _path.resolve.call(void 0, parsedOptions.runIdFile) : await preflightRunIdFile(parsedOptions.runIdFile)
@@ -13299,7 +13341,7 @@ async function handlePlayRun(args, hooks) {
13299
13341
  JSON.stringify({
13300
13342
  version: 1,
13301
13343
  admissionState: "submitted_unknown",
13302
- baseUrl: new (0, _chunkMQX363YFjs.DeeplineClient)().baseUrl,
13344
+ baseUrl: new (0, _chunkXBAH3TKUjs.DeeplineClient)().baseUrl,
13303
13345
  ...intent
13304
13346
  })
13305
13347
  );
@@ -13311,7 +13353,7 @@ async function handlePlayRun(args, hooks) {
13311
13353
  } finally {
13312
13354
  await removeRunIdTempFile(tempPath);
13313
13355
  }
13314
- await _optionalChain([hooks, 'optionalAccess', _532 => _532.onSubmission, 'optionalCall', _533 => _533(intent)]);
13356
+ await _optionalChain([hooks, 'optionalAccess', _534 => _534.onSubmission, 'optionalCall', _535 => _535(intent)]);
13315
13357
  },
13316
13358
  onRunStarted: async (runId) => {
13317
13359
  try {
@@ -13322,7 +13364,7 @@ async function handlePlayRun(args, hooks) {
13322
13364
  { cause: error }
13323
13365
  );
13324
13366
  }
13325
- await _optionalChain([hooks, 'optionalAccess', _534 => _534.onRunStarted, 'optionalCall', _535 => _535(runId)]);
13367
+ await _optionalChain([hooks, 'optionalAccess', _536 => _536.onRunStarted, 'optionalCall', _537 => _537(runId)]);
13326
13368
  },
13327
13369
  onRunAdmitted: async (runId) => {
13328
13370
  try {
@@ -13335,7 +13377,7 @@ async function handlePlayRun(args, hooks) {
13335
13377
  { cause: error }
13336
13378
  );
13337
13379
  }
13338
- await _optionalChain([hooks, 'optionalAccess', _536 => _536.onRunAdmitted, 'optionalCall', _537 => _537(runId)]);
13380
+ await _optionalChain([hooks, 'optionalAccess', _538 => _538.onRunAdmitted, 'optionalCall', _539 => _539(runId)]);
13339
13381
  }
13340
13382
  } : hooks;
13341
13383
  if (options.target.kind === "file") {
@@ -13344,7 +13386,7 @@ async function handlePlayRun(args, hooks) {
13344
13386
  }
13345
13387
  const resolved = _path.resolve.call(void 0, options.target.path);
13346
13388
  const message = `File not found: ${resolved}`;
13347
- if (_optionalChain([runHooks, 'optionalAccess', _538 => _538.writeDryRunError])) {
13389
+ if (_optionalChain([runHooks, 'optionalAccess', _540 => _540.writeDryRunError])) {
13348
13390
  runHooks.writeDryRunError(message);
13349
13391
  return 1;
13350
13392
  }
@@ -13387,7 +13429,7 @@ function parseRunIdPositional(args, usage2) {
13387
13429
  return arg;
13388
13430
  }
13389
13431
  }
13390
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(usage2);
13432
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(usage2);
13391
13433
  }
13392
13434
  function formatRunFactLines(value) {
13393
13435
  if (Array.isArray(value)) return value.flatMap(formatRunFactLines);
@@ -13399,6 +13441,10 @@ function formatRunFactLines(value) {
13399
13441
  }
13400
13442
  function renderRunOverviewText(overview, extras = {}) {
13401
13443
  const { run } = overview;
13444
+ const reportedErrors = readRecordArray(overview.errorDetails.reported);
13445
+ const isRuntimeLimit = reportedErrors.some(
13446
+ (failure) => failure.code === "RUNTIME_LIMIT_EXCEEDED"
13447
+ );
13402
13448
  const runLabel = runExecutionLabel(
13403
13449
  deriveRunExecutionState({
13404
13450
  status: run.status,
@@ -13419,10 +13465,10 @@ function renderRunOverviewText(overview, extras = {}) {
13419
13465
  ...buildRunActivityTextLines(run),
13420
13466
  ...buildRunStatusEvidenceTextLines(overview)
13421
13467
  ];
13422
- if (_optionalChain([overview, 'access', _539 => _539.runStatus, 'optionalAccess', _540 => _540.available]) === false)
13468
+ if (_optionalChain([overview, 'access', _541 => _541.runStatus, 'optionalAccess', _542 => _542.available]) === false)
13423
13469
  lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
13424
- const work = readRecord(_optionalChain([readRecord, 'call', _541 => _541(run), 'optionalAccess', _542 => _542.work]));
13425
- if (work && !_optionalChain([overview, 'access', _543 => _543.runStatus, 'optionalAccess', _544 => _544.available]))
13470
+ const work = readRecord(_optionalChain([readRecord, 'call', _543 => _543(run), 'optionalAccess', _544 => _544.work]));
13471
+ if (work && !_optionalChain([overview, 'access', _545 => _545.runStatus, 'optionalAccess', _546 => _546.available]))
13426
13472
  lines.push(
13427
13473
  ` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
13428
13474
  );
@@ -13434,8 +13480,15 @@ function renderRunOverviewText(overview, extras = {}) {
13434
13480
  if (retries) lines.push(` retries: ${formatRunRetrySummary(retries)}`);
13435
13481
  else if (run.retriesUnavailableReason)
13436
13482
  lines.push(` retries: unavailable (${run.retriesUnavailableReason})`);
13437
- if (run.error) lines.push(` error: ${run.error}`);
13483
+ if (run.error)
13484
+ lines.push(
13485
+ ` error: ${isRuntimeLimit ? "Runtime limit reached." : run.error}`
13486
+ );
13438
13487
  for (const warning of overview.warnings) lines.push(` warning: ${warning}`);
13488
+ if ((run.status === "failed" || run.status === "cancelled") && overview.datasets.length === 0 && !Object.hasOwn(overview, "result")) {
13489
+ lines.push("Rows kept only in memory were not published.");
13490
+ }
13491
+ lines.push(...formatRunRecoveryCommandLines(run.id, run.status));
13439
13492
  const sections = [];
13440
13493
  const jsonLines = (value) => (_nullishCoalesce(JSON.stringify(value, null, 2), () => ( "unavailable"))).split("\n");
13441
13494
  if (overview.steps.length)
@@ -13456,10 +13509,14 @@ function renderRunOverviewText(overview, extras = {}) {
13456
13509
  (step) => `${step.stepId}: ${step.label}${step.message ? ` \u2014 ${step.message}` : ""}`
13457
13510
  )
13458
13511
  });
13459
- if (Array.isArray(overview.errorDetails.reported) && overview.errorDetails.reported.length)
13512
+ if (reportedErrors.some((failure) => failure.code !== "RUNTIME_LIMIT_EXCEEDED"))
13460
13513
  sections.push({
13461
13514
  title: "Reported errors",
13462
- lines: formatRunFactLines(overview.errorDetails.reported)
13515
+ lines: formatRunFactLines(
13516
+ reportedErrors.filter(
13517
+ (failure) => failure.code !== "RUNTIME_LIMIT_EXCEEDED"
13518
+ )
13519
+ )
13463
13520
  });
13464
13521
  if (overview.rowOutcomes)
13465
13522
  sections.push({
@@ -13477,7 +13534,7 @@ function renderRunOverviewText(overview, extras = {}) {
13477
13534
  ...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
13478
13535
  ...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
13479
13536
  ...overview.failedLogs.entries,
13480
- ..._optionalChain([overview, 'access', _545 => _545.failedLogs, 'access', _546 => _546.next, 'optionalAccess', _547 => _547.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
13537
+ ..._optionalChain([overview, 'access', _547 => _547.failedLogs, 'access', _548 => _548.next, 'optionalAccess', _549 => _549.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
13481
13538
  ]
13482
13539
  });
13483
13540
  sections.push({
@@ -13537,7 +13594,7 @@ function renderRunOverviewText(overview, extras = {}) {
13537
13594
  );
13538
13595
  return `${lines.join("\n")}
13539
13596
 
13540
- ${_chunkEGTUOYYGjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
13597
+ ${_chunkLN6RXDTBjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
13541
13598
  }
13542
13599
  var RUN_READ_TIMING_PROGRESS_INTERVAL_MS = 15e3;
13543
13600
  async function withRunReadTiming(command, stage, enabled, action) {
@@ -13548,7 +13605,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
13548
13605
  const progressTimer = setInterval(() => {
13549
13606
  console.error(`[${command}] ${stage} still running after ${elapsedMs()}ms`);
13550
13607
  }, RUN_READ_TIMING_PROGRESS_INTERVAL_MS);
13551
- _optionalChain([progressTimer, 'access', _548 => _548.unref, 'optionalCall', _549 => _549()]);
13608
+ _optionalChain([progressTimer, 'access', _550 => _550.unref, 'optionalCall', _551 => _551()]);
13552
13609
  try {
13553
13610
  const result = await action();
13554
13611
  console.error(`[${command}] ${stage} completed in ${elapsedMs()}ms`);
@@ -13561,7 +13618,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
13561
13618
  }
13562
13619
  }
13563
13620
  async function handleRunGet(args) {
13564
- const selection = _chunkEGTUOYYGjs.parseJsonFields.call(void 0,
13621
+ const selection = _chunkLN6RXDTBjs.parseJsonFields.call(void 0,
13565
13622
  args,
13566
13623
  args.includes("--config") ? "config" : "get"
13567
13624
  );
@@ -13574,7 +13631,7 @@ async function handleRunGet(args) {
13574
13631
  console.error(error instanceof Error ? error.message : usage2);
13575
13632
  return 1;
13576
13633
  }
13577
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
13634
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
13578
13635
  const timing = args.includes("--timing");
13579
13636
  const web = args.includes("--web");
13580
13637
  if (web || args.includes("--web-url")) {
@@ -13592,8 +13649,8 @@ async function handleRunGet(args) {
13592
13649
  const dashboardUrl2 = _chunkXYIECA7Mjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
13593
13650
  const runUrl2 = _chunkXYIECA7Mjs.buildPlayRunUrl.call(void 0, client.baseUrl, playName2, runId);
13594
13651
  if (web) {
13595
- const opened = _chunkEGTUOYYGjs.openInBrowser.call(void 0, runUrl2);
13596
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
13652
+ const opened = _chunkLN6RXDTBjs.openInBrowser.call(void 0, runUrl2);
13653
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
13597
13654
  { dashboardUrl: dashboardUrl2, runUrl: runUrl2, opened: opened === "opened" },
13598
13655
  {
13599
13656
  json: args.includes("--json"),
@@ -13604,7 +13661,7 @@ async function handleRunGet(args) {
13604
13661
  );
13605
13662
  return 0;
13606
13663
  }
13607
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
13664
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
13608
13665
  { dashboardUrl: dashboardUrl2, runUrl: runUrl2 },
13609
13666
  { json: args.includes("--json"), text: `${runUrl2}
13610
13667
  ` }
@@ -13629,7 +13686,7 @@ async function handleRunGet(args) {
13629
13686
  "This server does not support recorded configuration reads."
13630
13687
  );
13631
13688
  }
13632
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
13689
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
13633
13690
  { runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
13634
13691
  { json: true, fields: selection.fields }
13635
13692
  );
@@ -13642,7 +13699,7 @@ async function handleRunGet(args) {
13642
13699
  timing,
13643
13700
  () => client.getRunInput(runId)
13644
13701
  );
13645
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, input, { json: true });
13702
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, input, { json: true });
13646
13703
  return 0;
13647
13704
  }
13648
13705
  const full = args.includes("--full");
@@ -13657,7 +13714,7 @@ async function handleRunGet(args) {
13657
13714
  failedLogs: args.includes("--log-failed")
13658
13715
  })
13659
13716
  );
13660
- if (status.package) _chunkV7SCRUFQjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
13717
+ if (status.package) _chunkKWYGWO4Yjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
13661
13718
  if (!status.package) {
13662
13719
  const legacyStatus = full ? await withRunReadTiming(
13663
13720
  "runs get",
@@ -13671,8 +13728,8 @@ async function handleRunGet(args) {
13671
13728
  const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
13672
13729
  const legacyDashboardUrl = legacyPlayName ? _chunkXYIECA7Mjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
13673
13730
  const legacyRunUrl = legacyPlayName ? _chunkXYIECA7Mjs.buildPlayRunUrl.call(void 0, client.baseUrl, legacyPlayName, runId) : null;
13674
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
13675
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
13731
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
13732
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
13676
13733
  {
13677
13734
  ...full ? legacyStatus : compactPlayStatus(legacyStatus),
13678
13735
  ...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {},
@@ -13683,7 +13740,7 @@ async function handleRunGet(args) {
13683
13740
  } else {
13684
13741
  writePlayResult(legacyStatus, false, { fullJson: full });
13685
13742
  if (legacyRunUrl)
13686
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
13743
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
13687
13744
  { dashboardUrl: legacyDashboardUrl, runUrl: legacyRunUrl },
13688
13745
  { json: false, text: `run page: ${legacyRunUrl}
13689
13746
  ` }
@@ -13713,11 +13770,11 @@ async function handleRunGet(args) {
13713
13770
  )
13714
13771
  ]);
13715
13772
  const hitLines = formatRunHitsLines(hits);
13716
- const json = _chunkEGTUOYYGjs.argsWantJson.call(void 0, args);
13773
+ const json = _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
13717
13774
  const playName = resolveRunPlayName(status, runId);
13718
13775
  const dashboardUrl = playName ? _chunkXYIECA7Mjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
13719
13776
  const runUrl = playName ? _chunkXYIECA7Mjs.buildPlayRunUrl.call(void 0, client.baseUrl, playName, runId) : void 0;
13720
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
13777
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
13721
13778
  {
13722
13779
  ...overview,
13723
13780
  ...dashboardUrl ? { dashboardUrl } : {},
@@ -13822,9 +13879,9 @@ async function handleRunLifecycleStatus(args) {
13822
13879
  console.error(error instanceof Error ? error.message : usage2);
13823
13880
  return 1;
13824
13881
  }
13825
- const status = await new (0, _chunkMQX363YFjs.DeeplineClient)().runs.status(runId);
13826
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
13827
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, status, { json: true });
13882
+ const status = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.status(runId);
13883
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
13884
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, status, { json: true });
13828
13885
  return 0;
13829
13886
  }
13830
13887
  if (!status.available) {
@@ -13890,7 +13947,7 @@ async function handleRunsRerun(args) {
13890
13947
  console.error(error instanceof Error ? error.message : usage2);
13891
13948
  return 1;
13892
13949
  }
13893
- const options = { json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args) };
13950
+ const options = { json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) };
13894
13951
  for (let index = 0; index < args.length; index += 1) {
13895
13952
  if (args[index] === "--idempotency-key") {
13896
13953
  options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
@@ -13956,8 +14013,8 @@ ${usage2}
13956
14013
  Discover Plays: ${next.discover}
13957
14014
  Active runs: ${next.running}`
13958
14015
  );
13959
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
13960
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
14016
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
14017
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
13961
14018
  { ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
13962
14019
  { json: true }
13963
14020
  );
@@ -13972,7 +14029,7 @@ Active runs: ${next.running}`
13972
14029
  console.error("--offset requires --play.");
13973
14030
  return 1;
13974
14031
  }
13975
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
14032
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
13976
14033
  const page = await withRunReadTiming(
13977
14034
  "runs list",
13978
14035
  "run inventory",
@@ -14007,7 +14064,7 @@ Active runs: ${next.running}`
14007
14064
  executionTime: run.executionTime,
14008
14065
  billingTotalCredits: run.billingTotalCredits,
14009
14066
  billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
14010
- playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _550 => _550.memo, 'optionalAccess', _551 => _551.playName]))), () => ( playName)), () => ( null)),
14067
+ playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _552 => _552.memo, 'optionalAccess', _553 => _553.playName]))), () => ( playName)), () => ( null)),
14011
14068
  ...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
14012
14069
  }));
14013
14070
  const lines = runs.length === 0 ? [
@@ -14039,14 +14096,14 @@ Active runs: ${next.running}`
14039
14096
  return lines2.join("\n");
14040
14097
  });
14041
14098
  const nextOffset = (_nullishCoalesce(_nullishCoalesce(page.offset, () => ( offset)), () => ( 0))) + runs.length;
14042
- const nextPage = page.hasMore && playName ? `deepline runs list --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}${nodeId ? ` --node ${_chunkAID3OYVJjs.shellQuote.call(void 0, nodeId)}` : ""}${statusFilter ? ` --status ${_chunkAID3OYVJjs.shellQuote.call(void 0, statusFilter)}` : ""} --limit ${_nullishCoalesce(_nullishCoalesce(page.limit, () => ( limit)), () => ( 20))} --offset ${nextOffset}${_chunkEGTUOYYGjs.argsWantJson.call(void 0, args) ? " --json" : ""}` : null;
14099
+ const nextPage = page.hasMore && playName ? `deepline runs list --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}${nodeId ? ` --node ${_chunkAID3OYVJjs.shellQuote.call(void 0, nodeId)}` : ""}${statusFilter ? ` --status ${_chunkAID3OYVJjs.shellQuote.call(void 0, statusFilter)}` : ""} --limit ${_nullishCoalesce(_nullishCoalesce(page.limit, () => ( limit)), () => ( 20))} --offset ${nextOffset}${_chunkLN6RXDTBjs.argsWantJson.call(void 0, args) ? " --json" : ""}` : null;
14043
14100
  if (page.hasMore) {
14044
14101
  lines.push("List truncated \u2014 more runs match this filter.");
14045
14102
  lines.push(
14046
14103
  nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
14047
14104
  );
14048
14105
  }
14049
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
14106
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
14050
14107
  {
14051
14108
  runs,
14052
14109
  count: runs.length,
@@ -14056,11 +14113,11 @@ Active runs: ${next.running}`
14056
14113
  ...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
14057
14114
  next: {
14058
14115
  page: nextPage,
14059
- get: _optionalChain([runs, 'access', _552 => _552[0], 'optionalAccess', _553 => _553.id]) ? `deepline runs get ${runs[0].id}` : null
14116
+ get: _optionalChain([runs, 'access', _554 => _554[0], 'optionalAccess', _555 => _555.id]) ? `deepline runs get ${runs[0].id}` : null
14060
14117
  },
14061
14118
  render: { sections: [{ title: "runs", lines }] }
14062
14119
  },
14063
- { json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args) }
14120
+ { json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
14064
14121
  );
14065
14122
  return 0;
14066
14123
  }
@@ -14090,7 +14147,7 @@ async function handleRunTail(args) {
14090
14147
  console.error("--log-level requires one of: debug, info, warn, error.");
14091
14148
  return 1;
14092
14149
  }
14093
- const parsed = _chunkDGKTHWWHjs.parseLogLevel.call(void 0, value);
14150
+ const parsed = _chunk2B4IOGFDjs.parseLogLevel.call(void 0, value);
14094
14151
  if (!parsed) {
14095
14152
  console.error(
14096
14153
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -14128,9 +14185,9 @@ async function handleRunTail(args) {
14128
14185
  );
14129
14186
  return 1;
14130
14187
  }
14131
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
14188
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
14132
14189
  const jsonLines = args.includes("--jsonl");
14133
- const jsonOutput = !jsonLines && _chunkEGTUOYYGjs.argsWantJson.call(void 0, args);
14190
+ const jsonOutput = !jsonLines && _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
14134
14191
  const compact = args.includes("--compact");
14135
14192
  const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
14136
14193
  const compactState = {
@@ -14211,7 +14268,7 @@ async function handleRunLogs(args) {
14211
14268
  ]);
14212
14269
  const cursorIndex = args.indexOf("--cursor");
14213
14270
  const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
14214
- const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkDGKTHWWHjs.isRunLogsCursor.call(void 0, cursorValue));
14271
+ const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunk2B4IOGFDjs.isRunLogsCursor.call(void 0, cursorValue));
14215
14272
  if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
14216
14273
  return handleRunEventSearch(args);
14217
14274
  }
@@ -14245,7 +14302,7 @@ async function handleRunLogs(args) {
14245
14302
  console.error("--log-level requires one of: debug, info, warn, error.");
14246
14303
  return 1;
14247
14304
  }
14248
- const parsed = _chunkDGKTHWWHjs.parseLogLevel.call(void 0, value);
14305
+ const parsed = _chunk2B4IOGFDjs.parseLogLevel.call(void 0, value);
14249
14306
  if (!parsed) {
14250
14307
  console.error(
14251
14308
  `Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
@@ -14292,12 +14349,12 @@ async function handleRunLogs(args) {
14292
14349
  );
14293
14350
  return 1;
14294
14351
  }
14295
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
14352
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
14296
14353
  if (outPath) {
14297
14354
  const result2 = await client.runs.logs(runId, { all: true });
14298
- const logs = result2.entries.filter((line) => _chunkDGKTHWWHjs.logLevelReaches.call(void 0, _chunkDGKTHWWHjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkDGKTHWWHjs.classifyLogLine.call(void 0, line).line);
14355
+ const logs = result2.entries.filter((line) => _chunk2B4IOGFDjs.logLevelReaches.call(void 0, _chunk2B4IOGFDjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunk2B4IOGFDjs.classifyLogLine.call(void 0, line).line);
14299
14356
  _fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
14300
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
14357
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
14301
14358
  {
14302
14359
  runId: result2.runId,
14303
14360
  log_path: outPath,
@@ -14320,7 +14377,7 @@ async function handleRunLogs(args) {
14320
14377
  ]
14321
14378
  }
14322
14379
  },
14323
- { json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args) }
14380
+ { json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
14324
14381
  );
14325
14382
  return 0;
14326
14383
  }
@@ -14351,7 +14408,7 @@ async function handleRunLogs(args) {
14351
14408
  }
14352
14409
  };
14353
14410
  const text = buildRunLogsText(filteredResult);
14354
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
14411
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
14355
14412
  {
14356
14413
  runId: result.runId,
14357
14414
  totalCount: result.totalCount,
@@ -14375,7 +14432,7 @@ async function handleRunLogs(args) {
14375
14432
  render: { sections: [{ title: "run logs", lines: entries }] }
14376
14433
  },
14377
14434
  {
14378
- json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args),
14435
+ json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args),
14379
14436
  text
14380
14437
  }
14381
14438
  );
@@ -14399,17 +14456,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
14399
14456
  );
14400
14457
  }
14401
14458
  const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
14402
- (entry) => _chunkDGKTHWWHjs.logLevelReaches.call(void 0, _chunkDGKTHWWHjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
14459
+ (entry) => _chunk2B4IOGFDjs.logLevelReaches.call(void 0, _chunk2B4IOGFDjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
14403
14460
  );
14404
14461
  const selected = matching.slice(-limit);
14405
14462
  const olderMatchesExist = matching.length > selected.length;
14406
14463
  return {
14407
14464
  entries: selected.map((entry) => entry.line),
14408
- firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _554 => _554[0], 'optionalAccess', _555 => _555.seq]), () => ( null)),
14409
- lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _556 => _556.at, 'call', _557 => _557(-1), 'optionalAccess', _558 => _558.seq]), () => ( null)),
14465
+ firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _556 => _556[0], 'optionalAccess', _557 => _557.seq]), () => ( null)),
14466
+ lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _558 => _558.at, 'call', _559 => _559(-1), 'optionalAccess', _560 => _560.seq]), () => ( null)),
14410
14467
  truncated: result.truncated || olderMatchesExist,
14411
14468
  hasMore: olderMatchesExist,
14412
- nextCursor: olderMatchesExist ? _chunkDGKTHWWHjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
14469
+ nextCursor: olderMatchesExist ? _chunk2B4IOGFDjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
14413
14470
  };
14414
14471
  }
14415
14472
  async function handleRunEventSearch(args) {
@@ -14476,7 +14533,7 @@ ${usage2}`);
14476
14533
  namespace,
14477
14534
  ...backend ? { backend } : {}
14478
14535
  } : void 0;
14479
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
14536
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
14480
14537
  const result = await client.runs.searchEvents({
14481
14538
  ...runId ? { runId } : {},
14482
14539
  ...values["--since"] ? { since: values["--since"] } : {},
@@ -14548,7 +14605,7 @@ ${renderedDetails}` : ""}`;
14548
14605
  "--limit",
14549
14606
  String(limit)
14550
14607
  ].join(" ") : null;
14551
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
14608
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
14552
14609
  {
14553
14610
  events,
14554
14611
  nextCursor: result.nextCursor,
@@ -14559,19 +14616,19 @@ ${renderedDetails}` : ""}`;
14559
14616
  render: { sections: [{ title: "runtime events", lines }] }
14560
14617
  },
14561
14618
  {
14562
- json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args),
14619
+ json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args),
14563
14620
  text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
14564
14621
  }
14565
14622
  );
14566
14623
  return 0;
14567
14624
  }
14568
14625
  function buildRunLogsText(result) {
14569
- const lines = result.entries.map((line) => _chunkDGKTHWWHjs.classifyLogLine.call(void 0, line).line);
14626
+ const lines = result.entries.map((line) => _chunk2B4IOGFDjs.classifyLogLine.call(void 0, line).line);
14570
14627
  if (result.warning) {
14571
14628
  if (lines.length > 0) lines.push("");
14572
14629
  lines.push(`warning: ${result.warning}`);
14573
14630
  lines.push(
14574
- `retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _559 => _559.next, 'optionalAccess', _560 => _560.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
14631
+ `retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _561 => _561.next, 'optionalAccess', _562 => _562.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
14575
14632
  );
14576
14633
  }
14577
14634
  return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
@@ -14600,7 +14657,7 @@ async function handleRunStop(args) {
14600
14657
  reason = args[++index];
14601
14658
  }
14602
14659
  }
14603
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
14660
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
14604
14661
  const result = await client.runs.stop(runId, { reason });
14605
14662
  const state = resolveRunStopState(result);
14606
14663
  const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
@@ -14615,7 +14672,7 @@ async function handleRunStop(args) {
14615
14672
  ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
14616
14673
  `inspect: deepline runs get ${runId} --full`
14617
14674
  ];
14618
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
14675
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
14619
14676
  {
14620
14677
  ...cancelling,
14621
14678
  state,
@@ -14630,7 +14687,7 @@ async function handleRunStop(args) {
14630
14687
  ]
14631
14688
  }
14632
14689
  },
14633
- { json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args) }
14690
+ { json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
14634
14691
  );
14635
14692
  return 0;
14636
14693
  }
@@ -14647,7 +14704,7 @@ async function handleRunStop(args) {
14647
14704
  ];
14648
14705
  process.stderr.write(`${lines2.join("\n")}
14649
14706
  `);
14650
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
14707
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
14651
14708
  {
14652
14709
  ...result,
14653
14710
  render: {
@@ -14662,7 +14719,7 @@ async function handleRunStop(args) {
14662
14719
  ]
14663
14720
  }
14664
14721
  },
14665
- { json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args) }
14722
+ { json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
14666
14723
  );
14667
14724
  return 1;
14668
14725
  }
@@ -14673,12 +14730,12 @@ async function handleRunStop(args) {
14673
14730
  `warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
14674
14731
  ] : []
14675
14732
  ];
14676
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
14733
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
14677
14734
  {
14678
14735
  ...result,
14679
14736
  render: { sections: [{ title: "run stop", lines }] }
14680
14737
  },
14681
- { json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args) }
14738
+ { json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
14682
14739
  );
14683
14740
  return 0;
14684
14741
  }
@@ -14728,18 +14785,18 @@ async function handleRunStopAll(args) {
14728
14785
  reason = args[++index];
14729
14786
  }
14730
14787
  }
14731
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
14788
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
14732
14789
  if (dryRun) {
14733
14790
  const result2 = await client.runs.stopAll({ dryRun: true, reason });
14734
14791
  const lines2 = buildStopAllDryRunTextLines(result2);
14735
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
14792
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
14736
14793
  {
14737
14794
  ...result2,
14738
14795
  render: {
14739
14796
  sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
14740
14797
  }
14741
14798
  },
14742
- { json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
14799
+ { json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
14743
14800
  ` }
14744
14801
  );
14745
14802
  return 0;
@@ -14752,17 +14809,17 @@ async function handleRunStopAll(args) {
14752
14809
  ...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
14753
14810
  ...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
14754
14811
  ];
14755
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
14812
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
14756
14813
  {
14757
14814
  ...result,
14758
14815
  render: { sections: [{ title: "workspace stop-all", lines }] }
14759
14816
  },
14760
- { json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args) }
14817
+ { json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args) }
14761
14818
  );
14762
14819
  return result.failed > 0 || result.partial ? 1 : 0;
14763
14820
  }
14764
14821
  async function handleRunExport(args) {
14765
- const selection = _chunkEGTUOYYGjs.parseJsonFields.call(void 0, args, "export");
14822
+ const selection = _chunkLN6RXDTBjs.parseJsonFields.call(void 0, args, "export");
14766
14823
  args = selection.args;
14767
14824
  const usage2 = "Usage: deepline runs export <run-id> [--dataset result.rows] --out <path> [--format csv|json] [--summary full|counts] [--wait] [--timeout-ms 300000] [--metadata-out export.json] [--allow-empty] [--json]";
14768
14825
  let runId;
@@ -14796,7 +14853,7 @@ async function handleRunExport(args) {
14796
14853
  if (arg === "--summary") {
14797
14854
  const value = args[++index];
14798
14855
  if (value !== "full" && value !== "counts") {
14799
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
14856
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
14800
14857
  "Invalid --summary. Choose full or counts.",
14801
14858
  void 0,
14802
14859
  "INVALID_ARGUMENT"
@@ -14807,7 +14864,7 @@ async function handleRunExport(args) {
14807
14864
  if (arg === "--timeout-ms") {
14808
14865
  waitTimeoutMs = parsePositiveInteger(_nullishCoalesce(args[++index], () => ( "")), arg);
14809
14866
  if (!wait) {
14810
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
14867
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
14811
14868
  "--timeout-ms requires --wait.",
14812
14869
  void 0,
14813
14870
  "INVALID_ARGUMENT"
@@ -14820,30 +14877,30 @@ async function handleRunExport(args) {
14820
14877
  return 1;
14821
14878
  }
14822
14879
  if (format !== "csv" && format !== "json") {
14823
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
14880
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
14824
14881
  "Invalid --format. Choose csv or json.",
14825
14882
  void 0,
14826
14883
  "INVALID_ARGUMENT"
14827
14884
  );
14828
14885
  }
14829
14886
  if (metadataOutPath === outPath) {
14830
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
14887
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
14831
14888
  "--metadata-out must differ from --out.",
14832
14889
  void 0,
14833
14890
  "INVALID_ARGUMENT"
14834
14891
  );
14835
14892
  }
14836
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
14893
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
14837
14894
  let status = await client.getPlayStatus(runId, { full: true });
14838
14895
  assertRunExportStatusIdentity(status, runId);
14839
14896
  if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
14840
- const progress = _chunk6CEUQYMBjs.createCliProgress.call(void 0, !_chunkEGTUOYYGjs.argsWantJson.call(void 0, args));
14897
+ const progress = _chunkHWDKRN7Ljs.createCliProgress.call(void 0, !_chunkLN6RXDTBjs.argsWantJson.call(void 0, args));
14841
14898
  try {
14842
14899
  await waitForPlayCompletionByWatch({
14843
14900
  client,
14844
14901
  playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
14845
14902
  workflowId: runId,
14846
- jsonOutput: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args),
14903
+ jsonOutput: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args),
14847
14904
  emitLogs: false,
14848
14905
  waitTimeoutMs,
14849
14906
  startedAt: Date.now(),
@@ -14869,26 +14926,26 @@ async function handleRunExport(args) {
14869
14926
  format,
14870
14927
  summary
14871
14928
  });
14872
- const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _561 => _561.rowsInfo, 'access', _562 => _562.source]), () => ( datasetPath)), () => ( null));
14873
- const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _563 => _563.currentTable]) ? {
14929
+ const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _563 => _563.rowsInfo, 'access', _564 => _564.source]), () => ( datasetPath)), () => ( null));
14930
+ const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _565 => _565.currentTable]) ? {
14874
14931
  code: "CURRENT_SHARED_DATASET",
14875
14932
  message: "This export is the current shared dataset and may include writes from another run.",
14876
14933
  full_run_output_command: `deepline runs get ${status.runId} --full`
14877
14934
  } : null;
14878
14935
  const navigation = buildRunNavigation(status);
14879
- const resolved = _optionalChain([exportResult, 'optionalAccess', _564 => _564.datasetInfo]);
14936
+ const resolved = _optionalChain([exportResult, 'optionalAccess', _566 => _566.datasetInfo]);
14880
14937
  const identity = navigation.datasets.find(
14881
- (dataset) => _optionalChain([resolved, 'optionalAccess', _565 => _565.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _566 => _566.tableNamespace])
14938
+ (dataset) => _optionalChain([resolved, 'optionalAccess', _567 => _567.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _568 => _568.tableNamespace])
14882
14939
  );
14883
14940
  const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
14884
14941
  const exportCommand = runExportRetryCommand(
14885
14942
  status.runId,
14886
14943
  outPath,
14887
- _nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _567 => _567.datasetPath]))),
14944
+ _nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _569 => _569.datasetPath]))),
14888
14945
  { format, summary }
14889
14946
  ) + (args.includes("--allow-empty") ? " --allow-empty" : "");
14890
- const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _568 => _568.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _569 => _569.path]), () => ( null)) };
14891
- const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _570 => _570.rowsInfo, 'access', _571 => _571.exportedRowOutcomes]);
14947
+ const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _570 => _570.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _571 => _571.path]), () => ( null)) };
14948
+ const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _572 => _572.rowsInfo, 'access', _573 => _573.exportedRowOutcomes]);
14892
14949
  const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
14893
14950
  count: exportedRowOutcomes.failed,
14894
14951
  message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
@@ -14908,17 +14965,17 @@ async function handleRunExport(args) {
14908
14965
  ...fileLocation,
14909
14966
  format,
14910
14967
  source,
14911
- rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _572 => _572.rowsInfo, 'access', _573 => _573.totalRows]), () => ( null)),
14968
+ rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _574 => _574.rowsInfo, 'access', _575 => _575.totalRows]), () => ( null)),
14912
14969
  ...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
14913
14970
  ...rowFailures ? { rowFailures } : {},
14914
- columns: _chunkV7SCRUFQjs.underscoreKeysLast.call(void 0, _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _574 => _574.rowsInfo, 'access', _575 => _575.columns]), () => ( []))),
14971
+ columns: _chunkKWYGWO4Yjs.underscoreKeysLast.call(void 0, _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _576 => _576.rowsInfo, 'access', _577 => _577.columns]), () => ( []))),
14915
14972
  ...currentTableNotice ? { notice: currentTableNotice } : {},
14916
14973
  ...metadataOutPath ? { metadata_path: metadataOutPath } : {},
14917
14974
  ...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
14918
14975
  };
14919
14976
  const lines = withRunNavigationLines(
14920
14977
  [
14921
- `Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _576 => _576.path]), () => ( outPath))}`,
14978
+ `Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _578 => _578.path]), () => ( outPath))}`,
14922
14979
  ...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
14923
14980
  `Partial export: run is ${status.status}; more rows may be saved.`,
14924
14981
  `Export after completion: ${exportCommand} --wait`
@@ -14945,8 +15002,8 @@ async function handleRunExport(args) {
14945
15002
  "utf-8"
14946
15003
  );
14947
15004
  }
14948
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, payload, {
14949
- json: _chunkEGTUOYYGjs.argsWantJson.call(void 0, args),
15005
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
15006
+ json: _chunkLN6RXDTBjs.argsWantJson.call(void 0, args),
14950
15007
  fields: selection.fields,
14951
15008
  text: `${lines.join("\n")}
14952
15009
  `
@@ -14955,7 +15012,7 @@ async function handleRunExport(args) {
14955
15012
  }
14956
15013
  function assertRunExportStatusIdentity(status, requestedRunId) {
14957
15014
  if (status.runId === requestedRunId) return;
14958
- throw new (0, _chunkSQWET4SLjs.DeeplineError)(
15015
+ throw new (0, _chunkBBTKAASQjs.DeeplineError)(
14959
15016
  `Run status identity did not match requested run ${requestedRunId}; refusing to export rows for ${status.runId || "an unidentified run"}.`,
14960
15017
  void 0,
14961
15018
  "RUN_EXPORT_SCOPE_MISMATCH",
@@ -14980,10 +15037,10 @@ async function handlePlayGet(args) {
14980
15037
  );
14981
15038
  return 2;
14982
15039
  }
14983
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
15040
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
14984
15041
  const explicitJson = args.includes("--json");
14985
15042
  const sourceOutput = args.includes("--source");
14986
- const jsonOutput = sourceOutput ? explicitJson : _chunkEGTUOYYGjs.argsWantJson.call(void 0, args);
15043
+ const jsonOutput = sourceOutput ? explicitJson : _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
14987
15044
  const requestedRevisionFlags = [
14988
15045
  args.includes("--working"),
14989
15046
  args.includes("--live"),
@@ -15036,7 +15093,7 @@ async function handlePlayGet(args) {
15036
15093
  ...includeSource ? { source: sourceSelector } : {}
15037
15094
  });
15038
15095
  const source = detail.source;
15039
- const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _577 => _577.files, 'access', _578 => _578[source.entryFile]]), () => ( ""));
15096
+ const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _579 => _579.files, 'access', _580 => _580[source.entryFile]]), () => ( ""));
15040
15097
  let materializedFile = null;
15041
15098
  try {
15042
15099
  materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
@@ -15046,7 +15103,7 @@ async function handlePlayGet(args) {
15046
15103
  }
15047
15104
  const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
15048
15105
  if (jsonOutput) {
15049
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, {
15106
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, {
15050
15107
  ...detail,
15051
15108
  ...materializedFile ? {
15052
15109
  message: loadedMessage,
@@ -15087,16 +15144,16 @@ async function handlePlayGet(args) {
15087
15144
  }
15088
15145
  console.log(`Play: ${formatPlayReference(detail.play)}`);
15089
15146
  console.log(
15090
- `Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _579 => _579.play, 'access', _580 => _580.workingRevision, 'optionalAccess', _581 => _581.version]), () => ( "\u2014"))}`
15147
+ `Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _581 => _581.play, 'access', _582 => _582.workingRevision, 'optionalAccess', _583 => _583.version]), () => ( "\u2014"))}`
15091
15148
  );
15092
- console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _582 => _582.play, 'access', _583 => _583.liveRevision, 'optionalAccess', _584 => _584.version]), () => ( "\u2014"))}`);
15149
+ console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _584 => _584.play, 'access', _585 => _585.liveRevision, 'optionalAccess', _586 => _586.version]), () => ( "\u2014"))}`);
15093
15150
  if (detail.play.liveRevision) {
15094
15151
  console.log(
15095
15152
  `Live max credits per run: ${liveMaxCreditsPerRun(detail.play.liveRevision.sourceCode)}`
15096
15153
  );
15097
15154
  }
15098
15155
  console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
15099
- if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _585 => _585.play, 'access', _586 => _586.liveRevision, 'optionalAccess', _587 => _587.version])) {
15156
+ if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _587 => _587.play, 'access', _588 => _588.liveRevision, 'optionalAccess', _589 => _589.version])) {
15100
15157
  console.log(
15101
15158
  ` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
15102
15159
  );
@@ -15108,7 +15165,7 @@ async function handlePlayGet(args) {
15108
15165
  console.log(line);
15109
15166
  }
15110
15167
  console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
15111
- console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _588 => _588.sheetSummary, 'optionalAccess', _589 => _589.stats, 'optionalAccess', _590 => _590.total]), () => ( 0))}`);
15168
+ console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _590 => _590.sheetSummary, 'optionalAccess', _591 => _591.stats, 'optionalAccess', _592 => _592.total]), () => ( 0))}`);
15112
15169
  if (detail.customerDbUrl) {
15113
15170
  console.log(`Customer DB: ${detail.customerDbUrl}`);
15114
15171
  }
@@ -15124,7 +15181,7 @@ async function handlePlayGet(args) {
15124
15181
  return 0;
15125
15182
  }
15126
15183
  function formatVersionLine(version) {
15127
- const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _591 => _591.artifactHash, 'optionalAccess', _592 => _592.slice, 'call', _593 => _593(0, 12)]), () => ( "unknown-revision"));
15184
+ const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _593 => _593.artifactHash, 'optionalAccess', _594 => _594.slice, 'call', _595 => _595(0, 12)]), () => ( "unknown-revision"));
15128
15185
  const state = [
15129
15186
  version.isLive ? "live" : null,
15130
15187
  version.isWorking ? "working" : null
@@ -15138,8 +15195,8 @@ async function handlePlayVersions(args) {
15138
15195
  console.error("Usage: deepline plays versions --name <name> [--json]");
15139
15196
  return 1;
15140
15197
  }
15141
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
15142
- const jsonOutput = _chunkEGTUOYYGjs.argsWantJson.call(void 0, args);
15198
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
15199
+ const jsonOutput = _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
15143
15200
  await assertCanonicalNamedPlayReference(client, playName, {
15144
15201
  command: "versions"
15145
15202
  });
@@ -15147,7 +15204,7 @@ async function handlePlayVersions(args) {
15147
15204
  parseReferencedPlayTarget(playName).playName
15148
15205
  );
15149
15206
  if (jsonOutput) {
15150
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, { versions });
15207
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, { versions });
15151
15208
  return 0;
15152
15209
  }
15153
15210
  if (versions.length === 0) {
@@ -15160,23 +15217,19 @@ async function handlePlayVersions(args) {
15160
15217
  return 0;
15161
15218
  }
15162
15219
  function formatPlayCostEstimate(estimate) {
15163
- const computeSummary = _optionalChain([estimate, 'optionalAccess', _594 => _594.compute]) ? `; ${estimate.status === "available" && estimate.source === "observed" ? "observed Deepline total includes usage-based compute; per-session ceiling" : "separate Deepline compute is usage-based; per-session ceiling"} across ${estimate.compute.pricedBackends.map(formatSandboxBackend).join(" and ")}: ${formatCredits(estimate.compute.maximumCredits)} credits (${formatSandboxBackend(estimate.compute.maximumBackend)} is highest; ${formatCredits(estimate.compute.maximumBillingSeconds)}s; total session count unbounded)` : "";
15164
15220
  if (!estimate || estimate.status === "unavailable") {
15165
- return `unavailable${estimate ? `: ${estimate.message}${computeSummary}` : ""}`;
15221
+ return `unavailable${estimate ? `: ${estimate.message}` : ""}`;
15166
15222
  }
15167
15223
  const credits = estimate.lowCredits === estimate.highCredits ? `${estimate.source === "observed" ? "~" : ""}${formatCredits(estimate.lowCredits)}` : `${formatCredits(estimate.lowCredits)}\u2013${formatCredits(estimate.highCredits)}`;
15168
15224
  const unit = estimate.unit === "row" ? "output row" : "run";
15169
15225
  const source = estimate.source === "observed" ? `observed from ${estimate.sampleRunCount} ${estimate.sampleRunCount === 1 ? "run" : "runs"}` : "static estimate";
15170
- return `${credits} Deepline credits per ${unit} (${source})${computeSummary}`;
15226
+ return `${credits} Deepline credits per ${unit} (${source})`;
15171
15227
  }
15172
15228
  function formatCredits(value) {
15173
15229
  return value.toLocaleString("en-US", {
15174
15230
  maximumFractionDigits: value < 1 ? 4 : 2
15175
15231
  });
15176
15232
  }
15177
- function formatSandboxBackend(backend) {
15178
- return backend === "daytona" ? "Daytona" : "Modal";
15179
- }
15180
15233
  var PREBUILT_PLAY_TAG_KEYS = [
15181
15234
  "smb",
15182
15235
  "find-prospects",
@@ -15190,8 +15243,8 @@ async function handlePlayCost(args) {
15190
15243
  console.error("Usage: deepline plays cost <play> [--json]");
15191
15244
  return 2;
15192
15245
  }
15193
- const result = await new (0, _chunkMQX363YFjs.DeeplineClient)().getPlayCostEstimate(name);
15194
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) console.log(JSON.stringify(result, null, 2));
15246
+ const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getPlayCostEstimate(name);
15247
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) console.log(JSON.stringify(result, null, 2));
15195
15248
  else
15196
15249
  console.log(
15197
15250
  `${result.reference}: ${formatPlayCostEstimate(result.costEstimate)}`
@@ -15199,11 +15252,11 @@ async function handlePlayCost(args) {
15199
15252
  return 0;
15200
15253
  }
15201
15254
  async function handlePlayList(args) {
15202
- const jsonOutput = _chunkEGTUOYYGjs.argsWantJson.call(void 0, args);
15255
+ const jsonOutput = _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
15203
15256
  const showCost = args.includes("--show-cost");
15204
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
15257
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
15205
15258
  const categoriesIndex = args.indexOf("--categories");
15206
- const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _595 => _595[categoriesIndex + 1], 'optionalAccess', _596 => _596.trim, 'call', _597 => _597()]) : void 0;
15259
+ const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _596 => _596[categoriesIndex + 1], 'optionalAccess', _597 => _597.trim, 'call', _598 => _598()]) : void 0;
15207
15260
  const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
15208
15261
  if (args.includes("--tag") && tags.length === 0) {
15209
15262
  console.error(
@@ -15224,7 +15277,7 @@ async function handlePlayList(args) {
15224
15277
  const cursorIndex = args.indexOf("--cursor");
15225
15278
  const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
15226
15279
  const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
15227
- if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _598 => _598.trim, 'call', _599 => _599()])) {
15280
+ if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _599 => _599.trim, 'call', _600 => _600()])) {
15228
15281
  console.error("Pass a positive --limit and a non-empty --cursor.");
15229
15282
  return 2;
15230
15283
  }
@@ -15265,7 +15318,7 @@ async function handlePlayList(args) {
15265
15318
  if (play.inputSchema || play.hasInputSchema) {
15266
15319
  lines.push(" inputSchema: yes");
15267
15320
  }
15268
- if (_optionalChain([play, 'access', _600 => _600.triggerStatus, 'optionalAccess', _601 => _601.cron])) {
15321
+ if (_optionalChain([play, 'access', _601 => _601.triggerStatus, 'optionalAccess', _602 => _602.cron])) {
15269
15322
  lines.push(
15270
15323
  ` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
15271
15324
  );
@@ -15285,12 +15338,12 @@ async function handlePlayList(args) {
15285
15338
  } else {
15286
15339
  lines.push(" scheduled execution: not configured");
15287
15340
  }
15288
- if (_optionalChain([play, 'access', _602 => _602.triggerStatus, 'optionalAccess', _603 => _603.webhook])) {
15341
+ if (_optionalChain([play, 'access', _603 => _603.triggerStatus, 'optionalAccess', _604 => _604.webhook])) {
15289
15342
  lines.push(` webhook: ${play.triggerStatus.webhook}`);
15290
15343
  }
15291
15344
  if (showCost) {
15292
15345
  lines.push(
15293
- ` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access', _604 => _604.observedCost, 'optionalAccess', _605 => _605.displayText]), () => ( formatPlayCostEstimate(play.costEstimate)))}`
15346
+ ` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access', _605 => _605.observedCost, 'optionalAccess', _606 => _606.displayText]), () => ( formatPlayCostEstimate(play.costEstimate)))}`
15294
15347
  );
15295
15348
  }
15296
15349
  lines.push(` run: deepline run ${reference}`);
@@ -15299,7 +15352,7 @@ async function handlePlayList(args) {
15299
15352
  lines.push("List truncated \u2014 more plays are available.");
15300
15353
  lines.push(`Next page: ${nextPage}`);
15301
15354
  }
15302
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
15355
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
15303
15356
  {
15304
15357
  plays,
15305
15358
  count: plays.length,
@@ -15316,8 +15369,8 @@ async function handlePlayList(args) {
15316
15369
  return 0;
15317
15370
  }
15318
15371
  async function handlePlayPin(args, pinned) {
15319
- const target = _optionalChain([args, 'access', _606 => _606.find, 'call', _607 => _607((arg) => !arg.startsWith("-")), 'optionalAccess', _608 => _608.trim, 'call', _609 => _609()]);
15320
- const jsonOutput = _chunkEGTUOYYGjs.argsWantJson.call(void 0, args);
15372
+ const target = _optionalChain([args, 'access', _607 => _607.find, 'call', _608 => _608((arg) => !arg.startsWith("-")), 'optionalAccess', _609 => _609.trim, 'call', _610 => _610()]);
15373
+ const jsonOutput = _chunkLN6RXDTBjs.argsWantJson.call(void 0, args);
15321
15374
  const dryRun = args.includes("--dry-run");
15322
15375
  if (!target) {
15323
15376
  console.error(
@@ -15335,11 +15388,11 @@ async function handlePlayPin(args, pinned) {
15335
15388
  const name = parsedTarget.playName;
15336
15389
  const plan = { name, pinned, dryRun };
15337
15390
  if (dryRun) {
15338
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, plan);
15391
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, plan);
15339
15392
  return 0;
15340
15393
  }
15341
- const result = await new (0, _chunkMQX363YFjs.DeeplineClient)().setPlayPinned(name, pinned);
15342
- if (jsonOutput) _chunkEGTUOYYGjs.printCompactJson.call(void 0, result);
15394
+ const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().setPlayPinned(name, pinned);
15395
+ if (jsonOutput) _chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
15343
15396
  else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
15344
15397
  return 0;
15345
15398
  }
@@ -15387,7 +15440,7 @@ function printPlayDescription(play) {
15387
15440
  console.log(` ${line}`);
15388
15441
  }
15389
15442
  }
15390
- if (_optionalChain([play, 'access', _610 => _610.toolCategories, 'optionalAccess', _611 => _611.length])) {
15443
+ if (_optionalChain([play, 'access', _611 => _611.toolCategories, 'optionalAccess', _612 => _612.length])) {
15391
15444
  console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
15392
15445
  }
15393
15446
  if (play.aliases.length > 0) {
@@ -15432,7 +15485,7 @@ function printPlayDescription(play) {
15432
15485
  const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
15433
15486
  if (runtimeLimit) {
15434
15487
  console.log(
15435
- ` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _612 => _612.runtimeLimit, 'optionalAccess', _613 => _613.source]), () => ( "live"))})`
15488
+ ` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _613 => _613.runtimeLimit, 'optionalAccess', _614 => _614.source]), () => ( "live"))})`
15436
15489
  );
15437
15490
  }
15438
15491
  printScheduledPlayCapacity(play.activeScheduledPlays);
@@ -15460,17 +15513,17 @@ function formatPlayGrepMatches(matches) {
15460
15513
  return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
15461
15514
  }
15462
15515
  async function handlePlayGrep(args) {
15463
- const query = _optionalChain([args, 'access', _614 => _614[0], 'optionalAccess', _615 => _615.trim, 'call', _616 => _616()]);
15516
+ const query = _optionalChain([args, 'access', _615 => _615[0], 'optionalAccess', _616 => _616.trim, 'call', _617 => _617()]);
15464
15517
  if (!query) {
15465
15518
  console.error("Usage: deepline plays grep <query> [--json]");
15466
15519
  return 1;
15467
15520
  }
15468
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
15521
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
15469
15522
  const results = (await client.listPlays({ grep: query })).map(
15470
15523
  summarizePlayGrepResult
15471
15524
  );
15472
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
15473
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, {
15525
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
15526
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, {
15474
15527
  plays: results,
15475
15528
  count: results.length,
15476
15529
  query,
@@ -15484,7 +15537,7 @@ async function handlePlayGrep(args) {
15484
15537
  `
15485
15538
  );
15486
15539
  for (const result of results) {
15487
- console.log(_optionalChain([result, 'access', _617 => _617.displayName, 'optionalAccess', _618 => _618.trim, 'call', _619 => _619()]) || result.name);
15540
+ console.log(_optionalChain([result, 'access', _618 => _618.displayName, 'optionalAccess', _619 => _619.trim, 'call', _620 => _620()]) || result.name);
15488
15541
  const matches = formatPlayGrepMatches(result.matches);
15489
15542
  if (matches) console.log(` Matched: ${matches}`);
15490
15543
  console.log(` Describe: ${result.describe}`);
@@ -15493,7 +15546,7 @@ async function handlePlayGrep(args) {
15493
15546
  return 0;
15494
15547
  }
15495
15548
  async function handlePlayDescribe(args) {
15496
- const selection = _chunkEGTUOYYGjs.parseJsonFields.call(void 0, args, "describe");
15549
+ const selection = _chunkLN6RXDTBjs.parseJsonFields.call(void 0, args, "describe");
15497
15550
  args = selection.args;
15498
15551
  const playName = args[0];
15499
15552
  if (!playName) {
@@ -15527,8 +15580,8 @@ async function handlePlayDescribe(args) {
15527
15580
  `deepline plays check ${playName}`,
15528
15581
  ...definedName ? [`deepline describe <workspace>/${definedName}`] : []
15529
15582
  ];
15530
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
15531
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, {
15583
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
15584
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, {
15532
15585
  ok: false,
15533
15586
  error: { message },
15534
15587
  next
@@ -15542,7 +15595,7 @@ async function handlePlayDescribe(args) {
15542
15595
  }
15543
15596
  return 2;
15544
15597
  }
15545
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
15598
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
15546
15599
  await assertCanonicalNamedPlayReference(client, playName, {
15547
15600
  command: "describe"
15548
15601
  });
@@ -15552,9 +15605,9 @@ async function handlePlayDescribe(args) {
15552
15605
  compact: args.includes("--compact")
15553
15606
  }
15554
15607
  );
15555
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
15556
- if (selection.fields) _chunkEGTUOYYGjs.printJson.call(void 0, play, selection.fields);
15557
- else _chunkEGTUOYYGjs.printCompactJson.call(void 0, play);
15608
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
15609
+ if (selection.fields) _chunkLN6RXDTBjs.printJson.call(void 0, play, selection.fields);
15610
+ else _chunkLN6RXDTBjs.printCompactJson.call(void 0, play);
15558
15611
  return 0;
15559
15612
  }
15560
15613
  printPlayDescription(play);
@@ -15574,19 +15627,49 @@ async function handlePlaySave(args) {
15574
15627
  );
15575
15628
  return 2;
15576
15629
  }
15630
+ const watchPlay = options.dryRun ? void 0 : options.watchPlay;
15631
+ const client = watchPlay ? new (0, _chunkXBAH3TKUjs.DeeplineClient)() : void 0;
15632
+ let attempt;
15633
+ if (watchPlay && client) {
15634
+ try {
15635
+ attempt = await client.beginWorkingPlaySave(watchPlay);
15636
+ } catch (error) {
15637
+ console.error(
15638
+ `Could not open the Play save status: ${error instanceof Error ? error.message : String(error)}`
15639
+ );
15640
+ return 5;
15641
+ }
15642
+ }
15643
+ const reportSave = async (action) => {
15644
+ if (!watchPlay || !client || !attempt) return;
15645
+ try {
15646
+ await client.finishWorkingPlaySave(watchPlay, attempt.attemptId, action);
15647
+ } catch (error) {
15648
+ console.error(
15649
+ `Could not update the Play save status: ${error instanceof Error ? error.message : String(error)}`
15650
+ );
15651
+ }
15652
+ };
15577
15653
  let graph;
15578
15654
  try {
15579
- graph = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
15655
+ graph = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
15580
15656
  "cli.play_save_bundle_graph",
15581
15657
  { targetKind: "file" },
15582
15658
  () => collectBundledPlayGraph(_path.resolve.call(void 0, options.target))
15583
15659
  );
15584
15660
  assertPlayGraphAuthoring(graph);
15585
15661
  } catch (error) {
15662
+ await reportSave("invalid_source");
15586
15663
  console.error(error instanceof Error ? error.message : String(error));
15587
15664
  return 7;
15588
15665
  }
15589
15666
  const playName = await _asyncNullishCoalesce(graph.root.playName, async () => ( await extractPlayName(graph.root.sourceCode, graph.root.filePath)));
15667
+ if (watchPlay && parseReferencedPlayTarget(watchPlay).unqualifiedPlayName !== playName) {
15668
+ console.error(
15669
+ `The file defines ${playName}, which does not match --watch-play ${watchPlay}.`
15670
+ );
15671
+ return 7;
15672
+ }
15590
15673
  const artifactHash = graph.root.artifact.artifactHash;
15591
15674
  if (options.expectedArtifactHash && options.expectedArtifactHash !== artifactHash) {
15592
15675
  const result = {
@@ -15598,7 +15681,7 @@ async function handlePlaySave(args) {
15598
15681
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
15599
15682
  };
15600
15683
  if (options.jsonOutput) {
15601
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, result);
15684
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
15602
15685
  } else {
15603
15686
  console.error(result.message);
15604
15687
  console.error(` checked artifact: ${result.expectedArtifactHash}`);
@@ -15620,7 +15703,7 @@ async function handlePlaySave(args) {
15620
15703
  };
15621
15704
  if (options.dryRun) {
15622
15705
  if (options.jsonOutput) {
15623
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, dryRun);
15706
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, dryRun);
15624
15707
  } else {
15625
15708
  console.log(`Dry run: ${playName}`);
15626
15709
  console.log(` source: ${dryRun.sourceHash}`);
@@ -15629,17 +15712,17 @@ async function handlePlaySave(args) {
15629
15712
  }
15630
15713
  return 0;
15631
15714
  }
15632
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
15715
+ const saveClient = _nullishCoalesce(client, () => ( new (0, _chunkXBAH3TKUjs.DeeplineClient)()));
15633
15716
  try {
15634
- await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
15717
+ await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
15635
15718
  "cli.play_save_compile_manifests",
15636
15719
  { targetKind: "file", nodeCount: graph.nodes.size },
15637
- () => compileBundledPlayGraphManifests(client, graph)
15720
+ () => compileBundledPlayGraphManifests(saveClient, graph)
15638
15721
  );
15639
- const saved = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
15722
+ const saved = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
15640
15723
  "cli.play_save_register_draft",
15641
15724
  { targetKind: "file", playName, artifactHash },
15642
- () => client.registerPlayArtifact({
15725
+ () => saveClient.registerPlayArtifact({
15643
15726
  name: playName,
15644
15727
  sourceCode: graph.root.sourceCode,
15645
15728
  sourceFiles: graph.root.sourceFiles,
@@ -15649,6 +15732,7 @@ async function handlePlaySave(args) {
15649
15732
  publish: false
15650
15733
  })
15651
15734
  );
15735
+ await reportSave("saved");
15652
15736
  const result = {
15653
15737
  success: true,
15654
15738
  name: playName,
@@ -15665,7 +15749,7 @@ async function handlePlaySave(args) {
15665
15749
  }
15666
15750
  };
15667
15751
  if (options.jsonOutput) {
15668
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, result);
15752
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
15669
15753
  } else {
15670
15754
  console.log(
15671
15755
  `\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
@@ -15677,6 +15761,9 @@ async function handlePlaySave(args) {
15677
15761
  }
15678
15762
  return 0;
15679
15763
  } catch (error) {
15764
+ if (extractPlayValidationErrors(error).length > 0) {
15765
+ await reportSave("invalid_source");
15766
+ }
15680
15767
  console.error(error instanceof Error ? error.message : String(error));
15681
15768
  return 5;
15682
15769
  }
@@ -15691,7 +15778,7 @@ async function handlePlayPublish(args) {
15691
15778
  }
15692
15779
  const { target: playName, useLatest } = options;
15693
15780
  let revisionId = options.revisionId;
15694
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
15781
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
15695
15782
  if (isFileTarget(playName)) {
15696
15783
  if (revisionId || useLatest) {
15697
15784
  console.error(
@@ -15701,7 +15788,7 @@ async function handlePlayPublish(args) {
15701
15788
  }
15702
15789
  let graph;
15703
15790
  try {
15704
- graph = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
15791
+ graph = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
15705
15792
  "cli.play_publish_bundle_graph",
15706
15793
  { targetKind: "file" },
15707
15794
  () => collectBundledPlayGraph(_path.resolve.call(void 0, playName))
@@ -15723,7 +15810,7 @@ async function handlePlayPublish(args) {
15723
15810
  next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
15724
15811
  };
15725
15812
  if (options.jsonOutput) {
15726
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, result3);
15813
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, result3);
15727
15814
  } else {
15728
15815
  console.error(result3.message);
15729
15816
  console.error(` checked artifact: ${result3.expectedArtifactHash}`);
@@ -15746,7 +15833,7 @@ async function handlePlayPublish(args) {
15746
15833
  };
15747
15834
  if (options.dryRun) {
15748
15835
  if (options.jsonOutput) {
15749
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, dryRun);
15836
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, dryRun);
15750
15837
  } else {
15751
15838
  console.log(`Dry run: ${rootPlayName}`);
15752
15839
  console.log(` source: ${dryRun.sourceHash}`);
@@ -15759,18 +15846,18 @@ async function handlePlayPublish(args) {
15759
15846
  try {
15760
15847
  previousLive = await _asyncNullishCoalesce((await client.getPlay(rootPlayName)).play.liveRevision, async () => ( null));
15761
15848
  } catch (error) {
15762
- if (!(error instanceof _chunkSQWET4SLjs.DeeplineError) || error.statusCode !== 404) {
15849
+ if (!(error instanceof _chunkBBTKAASQjs.DeeplineError) || error.statusCode !== 404) {
15763
15850
  console.error(error instanceof Error ? error.message : String(error));
15764
15851
  return 5;
15765
15852
  }
15766
15853
  }
15767
15854
  try {
15768
- await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
15855
+ await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
15769
15856
  "cli.play_publish_compile_manifests",
15770
15857
  { targetKind: "file", nodeCount: graph.nodes.size },
15771
15858
  () => compileBundledPlayGraphManifests(client, graph)
15772
15859
  );
15773
- await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
15860
+ await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
15774
15861
  "cli.play_publish_imports",
15775
15862
  { targetKind: "file", nodeCount: graph.nodes.size },
15776
15863
  () => publishImportedPlayDependencies(client, graph)
@@ -15779,7 +15866,7 @@ async function handlePlayPublish(args) {
15779
15866
  console.error(error instanceof Error ? error.message : String(error));
15780
15867
  return 1;
15781
15868
  }
15782
- const published = await _chunkDZS4JC7Ijs.traceCliSpan.call(void 0,
15869
+ const published = await _chunkLDGZFDUBjs.traceCliSpan.call(void 0,
15783
15870
  "cli.play_publish_register_root",
15784
15871
  {
15785
15872
  targetKind: "file",
@@ -15804,17 +15891,17 @@ async function handlePlayPublish(args) {
15804
15891
  artifactHash,
15805
15892
  liveVersion: _nullishCoalesce(published.version, () => ( null)),
15806
15893
  revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
15807
- previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _620 => _620.version]), () => ( null)),
15808
- previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _621 => _621.artifactHash]), () => ( null)),
15894
+ previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _621 => _621.version]), () => ( null)),
15895
+ previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _622 => _622.artifactHash]), () => ( null)),
15809
15896
  sourceBytes: {
15810
- before: _optionalChain([previousLive, 'optionalAccess', _622 => _622.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
15897
+ before: _optionalChain([previousLive, 'optionalAccess', _623 => _623.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
15811
15898
  after: Buffer.byteLength(graph.root.sourceCode, "utf8")
15812
15899
  },
15813
15900
  triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
15814
15901
  triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
15815
15902
  };
15816
15903
  if (options.jsonOutput) {
15817
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, result2);
15904
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, result2);
15818
15905
  } else {
15819
15906
  printPublishReceipt({
15820
15907
  name: rootPlayName,
@@ -15845,14 +15932,14 @@ async function handlePlayPublish(args) {
15845
15932
  revisionId: _nullishCoalesce(revisionId, () => ( null)),
15846
15933
  latest: useLatest
15847
15934
  };
15848
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, result2);
15935
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, result2);
15849
15936
  return 0;
15850
15937
  }
15851
15938
  const resolvedName = parseReferencedPlayTarget(playName).playName;
15852
15939
  if (useLatest) {
15853
15940
  const versions = await client.listPlayVersions(resolvedName);
15854
15941
  const latest = versions[0];
15855
- if (!_optionalChain([latest, 'optionalAccess', _623 => _623._id])) {
15942
+ if (!_optionalChain([latest, 'optionalAccess', _624 => _624._id])) {
15856
15943
  console.error(`No saved revisions found for ${resolvedName}.`);
15857
15944
  return 1;
15858
15945
  }
@@ -15869,7 +15956,7 @@ async function handlePlayPublish(args) {
15869
15956
  revisionId ? { revisionId } : {}
15870
15957
  );
15871
15958
  if (options.jsonOutput) {
15872
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, result);
15959
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
15873
15960
  } else {
15874
15961
  printPublishReceipt({
15875
15962
  name: result.name,
@@ -15909,7 +15996,7 @@ async function handlePlayDelete(args) {
15909
15996
  );
15910
15997
  return 2;
15911
15998
  }
15912
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
15999
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
15913
16000
  let detail;
15914
16001
  try {
15915
16002
  detail = await client.getPlay(parseReferencedPlayTarget(playName).playName);
@@ -15933,8 +16020,8 @@ async function handlePlayDelete(args) {
15933
16020
  name: resolvedName,
15934
16021
  plannedMutation: "move saved org-owned play to Trash and stop triggers"
15935
16022
  };
15936
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
15937
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, result2);
16023
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
16024
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, result2);
15938
16025
  } else {
15939
16026
  process.stdout.write(
15940
16027
  `Dry run: would move ${result2.name} to Trash and stop its active triggers.
@@ -15944,8 +16031,8 @@ async function handlePlayDelete(args) {
15944
16031
  return 0;
15945
16032
  }
15946
16033
  const result = await client.deletePlay(resolvedName);
15947
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
15948
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, result);
16034
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
16035
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
15949
16036
  return result.archived || result.alreadyArchived ? 0 : 4;
15950
16037
  }
15951
16038
  if (result.alreadyArchived) {
@@ -15984,13 +16071,13 @@ async function handlePlayRestore(args) {
15984
16071
  );
15985
16072
  return 2;
15986
16073
  }
15987
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
16074
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
15988
16075
  try {
15989
16076
  const result = await client.restorePlay(
15990
16077
  parseReferencedPlayTarget(playName).playName
15991
16078
  );
15992
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
15993
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, result);
16079
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
16080
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, result);
15994
16081
  return result.restored || result.alreadyActive ? 0 : 4;
15995
16082
  }
15996
16083
  if (result.alreadyActive) {
@@ -16082,7 +16169,7 @@ Authoring:
16082
16169
  Play work unless the caller explicitly asks to leave the inferred graph.
16083
16170
 
16084
16171
  Common commands:
16085
- deepline search "name and company domain -> work email" --type prebuilts
16172
+ deepline search "name and company domain -> work email"
16086
16173
  deepline describe prebuilt/person-linkedin-to-email
16087
16174
  deepline plays check prebuilt/name-and-domain-to-email-waterfall-batch
16088
16175
  deepline run prebuilt/person-linkedin-to-email --input '{"linkedin_url":"..."}'
@@ -16117,21 +16204,21 @@ Common commands:
16117
16204
  resume: `deepline plays resume-submission ${_chunkAID3OYVJjs.shellQuote.call(void 0, path)} --json`
16118
16205
  }
16119
16206
  };
16120
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0, result2, {
16207
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, result2, {
16121
16208
  json: options.json,
16122
16209
  text: `Submission ${saved.workflowId}: admission is unknown. ${result2.next.inspect}
16123
16210
  `
16124
16211
  });
16125
16212
  return;
16126
16213
  }
16127
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
16214
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
16128
16215
  if (new URL(saved.baseUrl).origin !== new URL(client.baseUrl).origin) {
16129
16216
  throw new Error(
16130
16217
  "The submission belongs to a different API origin. Select its original host before recovery."
16131
16218
  );
16132
16219
  }
16133
16220
  const result = await client.startPlayRun(saved.request);
16134
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
16221
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
16135
16222
  { ...result },
16136
16223
  {
16137
16224
  json: options.json,
@@ -16167,7 +16254,7 @@ Examples:
16167
16254
  ).action(async (target, options) => {
16168
16255
  process.exitCode = await handlePlayCheck([
16169
16256
  target,
16170
- ..._chunkEGTUOYYGjs.jsonFieldArgs.call(void 0, options.json),
16257
+ ..._chunkLN6RXDTBjs.jsonFieldArgs.call(void 0, options.json),
16171
16258
  ...options.full ? ["--full"] : []
16172
16259
  ]);
16173
16260
  });
@@ -16214,10 +16301,10 @@ Notes:
16214
16301
  with a changed input is refused with a 409 conflict. Use one stable key per
16215
16302
  exact intent. Without a key, each invocation starts a new run.
16216
16303
  --max-concurrent-external-calls controls the per-run provider-tool/deepline.fetch
16217
- resident-work ceiling. Default: ${_chunkTVINIDHBjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS}; accepted range: 1-${_chunkTVINIDHBjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS}.
16304
+ resident-work ceiling. Default: ${_chunkY2NTPYGSjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS}; accepted range: 1-${_chunkY2NTPYGSjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS}.
16218
16305
  Provider pacing and sandbox memory limits still apply.
16219
16306
  --max-concurrent-rows sets the run-wide default and ceiling for live map row
16220
- resolvers. Accepted range: 1-${_chunkTVINIDHBjs.MAX_CONFIGURABLE_CONCURRENT_ROWS}. The runtime
16307
+ resolvers. Accepted range: 1-${_chunkY2NTPYGSjs.MAX_CONFIGURABLE_CONCURRENT_ROWS}. The runtime
16221
16308
  may lower it when source-row size exceeds the active-row memory budget.
16222
16309
  --max-credits replaces the play's billing.maxCreditsPerRun for this run.
16223
16310
  Tool calls that would exceed it are denied.
@@ -16342,10 +16429,10 @@ Examples:
16342
16429
  ).hideHelp()
16343
16430
  ).option(
16344
16431
  "--max-concurrent-external-calls <count>",
16345
- `Concurrent provider-tool and deepline.fetch executions (${_chunkTVINIDHBjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS} default, max ${_chunkTVINIDHBjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS})`
16432
+ `Concurrent provider-tool and deepline.fetch executions (${_chunkY2NTPYGSjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS} default, max ${_chunkY2NTPYGSjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS})`
16346
16433
  ).option(
16347
16434
  "--max-concurrent-rows <count>",
16348
- `Run-wide dataset map row resolver ceiling (max ${_chunkTVINIDHBjs.MAX_CONFIGURABLE_CONCURRENT_ROWS})`
16435
+ `Run-wide dataset map row resolver ceiling (max ${_chunkY2NTPYGSjs.MAX_CONFIGURABLE_CONCURRENT_ROWS})`
16349
16436
  ).option("--max-credits <credits>", "Deepline-credit cap for this run").option("--open", "Open the run page in a browser after the run starts").option(
16350
16437
  "--debug-map-latency",
16351
16438
  "Internal diagnostics: emit one aggregate latency profile per dataset map"
@@ -16396,7 +16483,7 @@ JSON field selection:
16396
16483
  }
16397
16484
  }
16398
16485
  async function runPlayFromRun(target, options, command) {
16399
- const runId = _optionalChain([options, 'access', _624 => _624.fromRun, 'optionalAccess', _625 => _625.trim, 'call', _626 => _626()]);
16486
+ const runId = _optionalChain([options, 'access', _625 => _625.fromRun, 'optionalAccess', _626 => _626.trim, 'call', _627 => _627()]);
16400
16487
  if (!runId || runId.startsWith("--")) {
16401
16488
  console.error("--from-run requires a run id.");
16402
16489
  return 1;
@@ -16440,14 +16527,14 @@ JSON field selection:
16440
16527
  passthroughArgs.shift();
16441
16528
  }
16442
16529
  const exitCode = await handlePlayRun(
16443
- _chunkTVINIDHBjs.resolvePlayRunCliOptions.call(void 0,
16530
+ _chunkY2NTPYGSjs.resolvePlayRunCliOptions.call(void 0,
16444
16531
  _nullishCoalesce(effectiveTarget, () => ( void 0)),
16445
16532
  options,
16446
16533
  passthroughArgs,
16447
- _chunkDZS4JC7Ijs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
16534
+ _chunkLDGZFDUBjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
16448
16535
  )
16449
16536
  );
16450
- _chunkDZS4JC7Ijs.recordCliTrace.call(void 0, {
16537
+ _chunkLDGZFDUBjs.recordCliTrace.call(void 0, {
16451
16538
  phase: "cli.play_command_exit",
16452
16539
  exitCode
16453
16540
  });
@@ -16496,9 +16583,9 @@ Examples:
16496
16583
  const limit = Number(options.historyLimit);
16497
16584
  if (!Number.isInteger(limit) || limit < 1 || limit > 30)
16498
16585
  throw new Error("--history-limit must be an integer from 1 to 30.");
16499
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
16586
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
16500
16587
  if (options.binding) {
16501
- _chunkEGTUOYYGjs.printCompactJson.call(void 0,
16588
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0,
16502
16589
  await client.getPlayTriggerHistory(options.binding, { limit })
16503
16590
  );
16504
16591
  return;
@@ -16506,7 +16593,7 @@ Examples:
16506
16593
  const result = await client.listPlayTriggerInventory({
16507
16594
  cursor: options.cursor
16508
16595
  });
16509
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, {
16596
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, {
16510
16597
  ...result,
16511
16598
  next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
16512
16599
  });
@@ -16535,7 +16622,7 @@ Notes:
16535
16622
  Examples:
16536
16623
  deepline plays list
16537
16624
  deepline plays list --tag smb
16538
- deepline search "name and company domain -> work email" --type prebuilts
16625
+ deepline search "name and company domain -> work email"
16539
16626
  `
16540
16627
  ).option("--limit <count>", "Page size").option("--cursor <cursor>", "Continue a previous page").option("--show-cost", "Include the per-row or per-run cost estimate").option(
16541
16628
  "--summary",
@@ -16565,7 +16652,7 @@ Examples:
16565
16652
  if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
16566
16653
  throw new Error("--group-by must be kind or trigger_source.");
16567
16654
  }
16568
- const result = await new (0, _chunkMQX363YFjs.DeeplineClient)().getPlaysActivity({
16655
+ const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getPlaysActivity({
16569
16656
  timeZone: options.timeZone,
16570
16657
  days,
16571
16658
  ...options.endDate ? { endDate: options.endDate } : {},
@@ -16579,7 +16666,7 @@ Examples:
16579
16666
  `${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
16580
16667
  );
16581
16668
  }
16582
- _chunkEGTUOYYGjs.printCommandEnvelope.call(void 0,
16669
+ _chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
16583
16670
  { ...result },
16584
16671
  {
16585
16672
  json: Boolean(options.json),
@@ -16608,9 +16695,9 @@ Examples:
16608
16695
  false
16609
16696
  );
16610
16697
  });
16611
- _chunkIX45S5VCjs.registerDeprecatedSearchCommand.call(void 0,
16698
+ _chunkTX5TUHJNjs.registerDeprecatedSearchCommand.call(void 0,
16612
16699
  play,
16613
- (options) => options.all ? ["plays"] : ["prebuilts"]
16700
+ (options) => options.all ? ["prebuilts", "custom"] : ["prebuilts"]
16614
16701
  );
16615
16702
  play.command("grep <query>").description(
16616
16703
  "Search active org-owned Plays through Convex full-text search."
@@ -16649,9 +16736,9 @@ Examples:
16649
16736
  "--json [fields]",
16650
16737
  "JSON output; optionally select comma-separated dotted paths"
16651
16738
  );
16652
- _chunkV7SCRUFQjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
16739
+ _chunkKWYGWO4Yjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
16653
16740
  async (target, options) => {
16654
- const ownView = () => handlePlayDescribe(_chunkEGTUOYYGjs.describeArgs.call(void 0, target, options));
16741
+ const ownView = () => handlePlayDescribe(_chunkLN6RXDTBjs.describeArgs.call(void 0, target, options));
16655
16742
  const [flagText] = [options.json].filter(
16656
16743
  (value) => typeof value === "string"
16657
16744
  );
@@ -16662,7 +16749,7 @@ Examples:
16662
16749
  process.exitCode = await ownView();
16663
16750
  return;
16664
16751
  }
16665
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-IVTSD7ST.js")));
16752
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-WW3OQRLP.js")));
16666
16753
  process.exitCode = await describeAnything(
16667
16754
  name,
16668
16755
  {
@@ -16706,16 +16793,21 @@ Notes:
16706
16793
 
16707
16794
  Examples:
16708
16795
  deepline plays save ./company-research.play.ts
16796
+ deepline plays save ./company-research.play.ts --watch-play company-research
16709
16797
  deepline plays save ./company-research.play.ts --dry-run
16710
16798
  deepline plays publish ./company-research.play.ts
16711
16799
  `
16712
16800
  ).option("--expected-artifact <hash>", "Require the checked artifact hash").option(
16801
+ "--watch-play <reference>",
16802
+ "Show rejected saves on your open working canvas"
16803
+ ).option(
16713
16804
  "--dry-run",
16714
16805
  "Bundle and show the planned draft save without mutation"
16715
16806
  ).option("--json", "Emit JSON output").action(async (file, options) => {
16716
16807
  process.exitCode = await handlePlaySave([
16717
16808
  file,
16718
16809
  ...options.expectedArtifact ? ["--expected-artifact", options.expectedArtifact] : [],
16810
+ ...options.watchPlay ? ["--watch-play", options.watchPlay] : [],
16719
16811
  ...options.dryRun ? ["--dry-run"] : [],
16720
16812
  ...options.json ? ["--json"] : []
16721
16813
  ]);
@@ -16780,7 +16872,7 @@ Examples:
16780
16872
  deepline plays deployments <deployment-id>
16781
16873
  `
16782
16874
  ).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
16783
- async (id, options) => id ? _chunkNDFNBJGLjs.handleDeploymentGet.call(void 0, id, options) : _chunkNDFNBJGLjs.handleDeploymentsList.call(void 0, options)
16875
+ async (id, options) => id ? _chunkVBDZIMWDjs.handleDeploymentGet.call(void 0, id, options) : _chunkVBDZIMWDjs.handleDeploymentsList.call(void 0, options)
16784
16876
  );
16785
16877
  addPublishHelp(
16786
16878
  play.command("publish <target>").description(
@@ -16915,14 +17007,14 @@ Examples:
16915
17007
  const limit = Number(options.limit);
16916
17008
  if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
16917
17009
  throw new Error("--limit must be an integer from 1 to 1000.");
16918
- const result = await new (0, _chunkMQX363YFjs.DeeplineClient)().runs.rowHistory({
17010
+ const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().runs.rowHistory({
16919
17011
  playName: options.play,
16920
17012
  runId,
16921
17013
  tableNamespace: options.dataset,
16922
17014
  limit,
16923
17015
  cursor: options.cursor
16924
17016
  });
16925
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, {
17017
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, {
16926
17018
  ...result,
16927
17019
  ...result.nextCursor ? {
16928
17020
  next: `deepline runs rows-history ${_chunkAID3OYVJjs.shellQuote.call(void 0, runId)} --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.play)} --dataset ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.dataset)} --limit ${limit} --cursor ${_chunkAID3OYVJjs.shellQuote.call(void 0, result.nextCursor)} --json`
@@ -17000,7 +17092,7 @@ Examples:
17000
17092
  new (0, _commander.Option)("--log-failed", "Attach terminal-failure logs").hideHelp()
17001
17093
  ).action(async (runId, options) => {
17002
17094
  if (TOOL_EXECUTION_ID.test(runId)) {
17003
- const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-VMMERMLO.js")));
17095
+ const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-SBDUL3WB.js")));
17004
17096
  process.exitCode = await getToolExecutionReceipt(runId, {
17005
17097
  receiptJson: options.json !== void 0
17006
17098
  });
@@ -17008,7 +17100,7 @@ Examples:
17008
17100
  }
17009
17101
  process.exitCode = await handleRunGet([
17010
17102
  runId,
17011
- ..._chunkEGTUOYYGjs.jsonFieldArgs.call(void 0, options.json),
17103
+ ..._chunkLN6RXDTBjs.jsonFieldArgs.call(void 0, options.json),
17012
17104
  ...options.web ? ["--web"] : [],
17013
17105
  ...options.webUrl ? ["--web-url"] : [],
17014
17106
  ...options.full ? ["--full"] : [],
@@ -17064,7 +17156,9 @@ Examples:
17064
17156
  `
17065
17157
  Notes:
17066
17158
  Continues the same run id with its original input and pinned revision.
17067
- Completed calls are reused; only work the run had not finished runs.
17159
+ Matching completed operations can be recovered, even when their calls used
17160
+ staleAfterSeconds: 0. Unfinished or unrecorded work can incur charges.
17161
+ Dataset reuse counts do not measure all work available to resume.
17068
17162
  A run can be resumed for 14 days after it stops. To start over as a new
17069
17163
  run instead, use deepline plays run --from-run <run-id>.
17070
17164
  The server refuses while the run is still active, while its last attempt
@@ -17328,7 +17422,7 @@ Examples:
17328
17422
  ...options.allowEmpty ? ["--allow-empty"] : [],
17329
17423
  ...options.wait ? ["--wait"] : [],
17330
17424
  ...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
17331
- ..._chunkEGTUOYYGjs.jsonFieldArgs.call(void 0, options.json)
17425
+ ..._chunkLN6RXDTBjs.jsonFieldArgs.call(void 0, options.json)
17332
17426
  ]);
17333
17427
  });
17334
17428
  const share = play.command("share").description(
@@ -17469,8 +17563,8 @@ function absolutePublicPlayUrl(path) {
17469
17563
  }
17470
17564
  function shareUrlFields(status) {
17471
17565
  return {
17472
- publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _627 => _627.share, 'optionalAccess', _628 => _628.publicPath])),
17473
- canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _629 => _629.share, 'optionalAccess', _630 => _630.canonicalPath]))
17566
+ publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _628 => _628.share, 'optionalAccess', _629 => _629.publicPath])),
17567
+ canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _630 => _630.share, 'optionalAccess', _631 => _631.canonicalPath]))
17474
17568
  };
17475
17569
  }
17476
17570
  function shareStatusForOutput(status) {
@@ -17494,10 +17588,10 @@ async function handlePlayShareStatus(args) {
17494
17588
  return 2;
17495
17589
  }
17496
17590
  const name = parseReferencedPlayTarget(target).playName;
17497
- const status = await new (0, _chunkMQX363YFjs.DeeplineClient)().getSharePage(name);
17591
+ const status = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().getSharePage(name);
17498
17592
  const outputStatus = shareStatusForOutput(status);
17499
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
17500
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, outputStatus);
17593
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
17594
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, outputStatus);
17501
17595
  return 0;
17502
17596
  }
17503
17597
  if (!outputStatus.share) {
@@ -17536,7 +17630,7 @@ async function handlePlaySharePublish(args) {
17536
17630
  return 2;
17537
17631
  }
17538
17632
  const name = parseReferencedPlayTarget(target).playName;
17539
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
17633
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
17540
17634
  let revisionId = shareFlagValue(args, "--revision-id");
17541
17635
  let resolvedVersion;
17542
17636
  if (!revisionId) {
@@ -17567,8 +17661,8 @@ async function handlePlaySharePublish(args) {
17567
17661
  );
17568
17662
  if (!hasCompleted) {
17569
17663
  const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
17570
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
17571
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, {
17664
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
17665
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, {
17572
17666
  ok: false,
17573
17667
  code: "NO_SUCCESSFUL_RUN",
17574
17668
  message,
@@ -17592,8 +17686,8 @@ async function handlePlaySharePublish(args) {
17592
17686
  };
17593
17687
  if (args.includes("--dry-run")) {
17594
17688
  const plan = { dryRun: true, name, version: resolvedVersion, ...request };
17595
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
17596
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, plan);
17689
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
17690
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, plan);
17597
17691
  } else {
17598
17692
  console.log(
17599
17693
  `Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
@@ -17603,13 +17697,13 @@ async function handlePlaySharePublish(args) {
17603
17697
  }
17604
17698
  const status = await client.publishSharePage(name, request);
17605
17699
  const outputStatus = shareStatusForOutput(status);
17606
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
17607
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, outputStatus);
17700
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
17701
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, outputStatus);
17608
17702
  return 0;
17609
17703
  }
17610
17704
  const urls = shareUrlFields(outputStatus);
17611
17705
  console.log(
17612
- `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _631 => _631.share, 'optionalAccess', _632 => _632.publicPath]))), () => ( ""))}`
17706
+ `Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _632 => _632.share, 'optionalAccess', _633 => _633.publicPath]))), () => ( ""))}`
17613
17707
  );
17614
17708
  if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
17615
17709
  console.log(`Version URL: ${urls.canonicalUrl}`);
@@ -17635,9 +17729,9 @@ async function handlePlayShareUpdate(args) {
17635
17729
  ...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
17636
17730
  ...seoIndexing ? { seoIndexing } : {}
17637
17731
  };
17638
- const status = await new (0, _chunkMQX363YFjs.DeeplineClient)().updateSharePage(name, request);
17639
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
17640
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, status);
17732
+ const status = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().updateSharePage(name, request);
17733
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
17734
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, status);
17641
17735
  return 0;
17642
17736
  }
17643
17737
  console.log(`Updated ${name} share settings.`);
@@ -17652,13 +17746,13 @@ async function handlePlayShareRegenerate(args) {
17652
17746
  return 2;
17653
17747
  }
17654
17748
  const name = parseReferencedPlayTarget(target).playName;
17655
- const client = new (0, _chunkMQX363YFjs.DeeplineClient)();
17749
+ const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
17656
17750
  let revisionId = shareFlagValue(args, "--revision-id");
17657
17751
  const versionFlag = shareFlagValue(args, "--version");
17658
17752
  if (!revisionId && versionFlag) {
17659
17753
  const versions = await client.listPlayVersions(name);
17660
17754
  const chosen = versions.find((r) => r.version === Number(versionFlag));
17661
- if (!_optionalChain([chosen, 'optionalAccess', _633 => _633._id])) {
17755
+ if (!_optionalChain([chosen, 'optionalAccess', _634 => _634._id])) {
17662
17756
  console.error(`Version ${versionFlag} not found for ${name}.`);
17663
17757
  return 4;
17664
17758
  }
@@ -17669,12 +17763,12 @@ async function handlePlayShareRegenerate(args) {
17669
17763
  revisionId ? { revisionId } : {}
17670
17764
  );
17671
17765
  const outputStatus = shareStatusForOutput(status);
17672
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
17673
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, outputStatus);
17766
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
17767
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, outputStatus);
17674
17768
  return 0;
17675
17769
  }
17676
17770
  const urls = shareUrlFields(outputStatus);
17677
- const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _634 => _634.share, 'optionalAccess', _635 => _635.publishedRevisionId]) === revisionId;
17771
+ const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _635 => _635.share, 'optionalAccess', _636 => _636.publishedRevisionId]) === revisionId;
17678
17772
  console.log(
17679
17773
  `Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
17680
17774
  );
@@ -17695,9 +17789,9 @@ async function handlePlayShareUnpublish(args) {
17695
17789
  return 2;
17696
17790
  }
17697
17791
  const name = parseReferencedPlayTarget(target).playName;
17698
- const status = await new (0, _chunkMQX363YFjs.DeeplineClient)().unpublishSharePage(name);
17699
- if (_chunkEGTUOYYGjs.argsWantJson.call(void 0, args)) {
17700
- _chunkEGTUOYYGjs.printCompactJson.call(void 0, status);
17792
+ const status = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().unpublishSharePage(name);
17793
+ if (_chunkLN6RXDTBjs.argsWantJson.call(void 0, args)) {
17794
+ _chunkLN6RXDTBjs.printCompactJson.call(void 0, status);
17701
17795
  return 0;
17702
17796
  }
17703
17797
  console.log(`Unpublished ${name}; the public page has been removed.`);
@@ -17775,4 +17869,4 @@ async function handlePlayShareUnpublish(args) {
17775
17869
 
17776
17870
 
17777
17871
 
17778
- exports.PREBUILT_PLAY_TAG_KEYS = PREBUILT_PLAY_TAG_KEYS; exports.assertDatasetHasExportableRows = assertDatasetHasExportableRows; exports.buildPlayCompletionTextLines = buildPlayCompletionTextLines; exports.buildRunActivityTextLines = buildRunActivityTextLines; exports.buildRunLaunch = buildRunLaunch; exports.buildRunLogsText = buildRunLogsText; exports.buildRunPackageTextLines = buildRunPackageTextLines; exports.buildStopAllDryRunTextLines = buildStopAllDryRunTextLines; exports.checkPlayFileExports = checkPlayFileExports; exports.clampJsonPreviewText = clampJsonPreviewText; exports.compactPlayStatus = compactPlayStatus; exports.csvColumnLines = csvColumnLines; exports.describeSleepUntil = describeSleepUntil; exports.exportPlayStatusRows = exportPlayStatusRows; exports.formatPlaySandboxRuntimeWarning = formatPlaySandboxRuntimeWarning; exports.formatStepLabelFromNodeId = formatStepLabelFromNodeId; exports.getFinalStatusFromLiveEvent = getFinalStatusFromLiveEvent; exports.getProgressLinesFromLiveEvent = getProgressLinesFromLiveEvent; exports.getRunningHeartbeatLine = getRunningHeartbeatLine; exports.getStepTransitionLineFromLiveEvent = getStepTransitionLineFromLiveEvent; exports.handlePlayCheck = handlePlayCheck; exports.handlePlayCost = handlePlayCost; exports.handlePlayDelete = handlePlayDelete; exports.handlePlayDescribe = handlePlayDescribe; exports.handlePlayGet = handlePlayGet; exports.handlePlayGrep = handlePlayGrep; exports.handlePlayList = handlePlayList; exports.handlePlayPin = handlePlayPin; exports.handlePlayPublish = handlePlayPublish; exports.handlePlayRestore = handlePlayRestore; exports.handlePlayRun = handlePlayRun; exports.handlePlaySave = handlePlaySave; exports.handlePlaySharePublish = handlePlaySharePublish; exports.handlePlayShareRegenerate = handlePlayShareRegenerate; exports.handlePlayShareStatus = handlePlayShareStatus; exports.handlePlayShareUnpublish = handlePlayShareUnpublish; exports.handlePlayShareUpdate = handlePlayShareUpdate; exports.handlePlayVersions = handlePlayVersions; exports.handleRunEventSearch = handleRunEventSearch; exports.handleRunExport = handleRunExport; exports.handleRunGet = handleRunGet; exports.handleRunLifecycleStatus = handleRunLifecycleStatus; exports.handleRunLogs = handleRunLogs; exports.handleRunStop = handleRunStop; exports.handleRunStopAll = handleRunStopAll; exports.handleRunTail = handleRunTail; exports.handleRunsList = handleRunsList; exports.handleRunsRerun = handleRunsRerun; exports.liveMaxCreditsPerRun = liveMaxCreditsPerRun; exports.loadPlayBundler = loadPlayBundler; exports.parsePlayPublishOptions = parsePlayPublishOptions; exports.parsePlayRunHeaderFlag = _chunkTVINIDHBjs.parsePlayRunHeaderFlag; exports.parsePlayRunOptions = _chunkTVINIDHBjs.parsePlayRunOptions; exports.preflightLocalFileInputs = preflightLocalFileInputs; exports.registerPlayCommands = registerPlayCommands; exports.renderRunOverviewText = renderRunOverviewText; exports.resolveDatasetByName = resolveDatasetByName; exports.resolvePlayRunOutputStatus = resolvePlayRunOutputStatus; exports.resolvePlayRunUrl = resolvePlayRunUrl; exports.resolveRunStopState = resolveRunStopState; exports.selectRunLogTailPage = selectRunLogTailPage; exports.shouldPrintPlayProgressLine = shouldPrintPlayProgressLine; exports.startAndWaitForPlayCompletion = startAndWaitForPlayCompletion; exports.startAndWaitForPlayCompletionByStream = startAndWaitForPlayCompletionByStream; exports.takeFromRunRerunArgs = takeFromRunRerunArgs; exports.truncateErrorForDisplay = truncateErrorForDisplay; exports.waitForPlayCompletionByWatch = waitForPlayCompletionByWatch; exports.withTerminalPlayIdentity = withTerminalPlayIdentity; exports.writeInlinePlay = writeInlinePlay; exports.writePlayRunIdFile = writePlayRunIdFile; exports.writePlayRunReceipt = writePlayRunReceipt;
17872
+ exports.PREBUILT_PLAY_TAG_KEYS = PREBUILT_PLAY_TAG_KEYS; exports.assertDatasetHasExportableRows = assertDatasetHasExportableRows; exports.buildPlayCompletionTextLines = buildPlayCompletionTextLines; exports.buildRunActivityTextLines = buildRunActivityTextLines; exports.buildRunLaunch = buildRunLaunch; exports.buildRunLogsText = buildRunLogsText; exports.buildRunPackageTextLines = buildRunPackageTextLines; exports.buildStopAllDryRunTextLines = buildStopAllDryRunTextLines; exports.checkPlayFileExports = checkPlayFileExports; exports.clampJsonPreviewText = clampJsonPreviewText; exports.compactPlayStatus = compactPlayStatus; exports.csvColumnLines = csvColumnLines; exports.describeSleepUntil = describeSleepUntil; exports.exportPlayStatusRows = exportPlayStatusRows; exports.formatPlaySandboxRuntimeWarning = formatPlaySandboxRuntimeWarning; exports.formatStepLabelFromNodeId = formatStepLabelFromNodeId; exports.getFinalStatusFromLiveEvent = getFinalStatusFromLiveEvent; exports.getProgressLinesFromLiveEvent = getProgressLinesFromLiveEvent; exports.getRunningHeartbeatLine = getRunningHeartbeatLine; exports.getStepTransitionLineFromLiveEvent = getStepTransitionLineFromLiveEvent; exports.handlePlayCheck = handlePlayCheck; exports.handlePlayCost = handlePlayCost; exports.handlePlayDelete = handlePlayDelete; exports.handlePlayDescribe = handlePlayDescribe; exports.handlePlayGet = handlePlayGet; exports.handlePlayGrep = handlePlayGrep; exports.handlePlayList = handlePlayList; exports.handlePlayPin = handlePlayPin; exports.handlePlayPublish = handlePlayPublish; exports.handlePlayRestore = handlePlayRestore; exports.handlePlayRun = handlePlayRun; exports.handlePlaySave = handlePlaySave; exports.handlePlaySharePublish = handlePlaySharePublish; exports.handlePlayShareRegenerate = handlePlayShareRegenerate; exports.handlePlayShareStatus = handlePlayShareStatus; exports.handlePlayShareUnpublish = handlePlayShareUnpublish; exports.handlePlayShareUpdate = handlePlayShareUpdate; exports.handlePlayVersions = handlePlayVersions; exports.handleRunEventSearch = handleRunEventSearch; exports.handleRunExport = handleRunExport; exports.handleRunGet = handleRunGet; exports.handleRunLifecycleStatus = handleRunLifecycleStatus; exports.handleRunLogs = handleRunLogs; exports.handleRunStop = handleRunStop; exports.handleRunStopAll = handleRunStopAll; exports.handleRunTail = handleRunTail; exports.handleRunsList = handleRunsList; exports.handleRunsRerun = handleRunsRerun; exports.liveMaxCreditsPerRun = liveMaxCreditsPerRun; exports.loadPlayBundler = loadPlayBundler; exports.parsePlayPublishOptions = parsePlayPublishOptions; exports.parsePlayRunHeaderFlag = _chunkY2NTPYGSjs.parsePlayRunHeaderFlag; exports.parsePlayRunOptions = _chunkY2NTPYGSjs.parsePlayRunOptions; exports.preflightLocalFileInputs = preflightLocalFileInputs; exports.registerPlayCommands = registerPlayCommands; exports.renderRunOverviewText = renderRunOverviewText; exports.resolveDatasetByName = resolveDatasetByName; exports.resolvePlayRunOutputStatus = resolvePlayRunOutputStatus; exports.resolvePlayRunUrl = resolvePlayRunUrl; exports.resolveRunStopState = resolveRunStopState; exports.selectRunLogTailPage = selectRunLogTailPage; exports.shouldPrintPlayProgressLine = shouldPrintPlayProgressLine; exports.startAndWaitForPlayCompletion = startAndWaitForPlayCompletion; exports.startAndWaitForPlayCompletionByStream = startAndWaitForPlayCompletionByStream; exports.takeFromRunRerunArgs = takeFromRunRerunArgs; exports.truncateErrorForDisplay = truncateErrorForDisplay; exports.waitForPlayCompletionByWatch = waitForPlayCompletionByWatch; exports.withTerminalPlayIdentity = withTerminalPlayIdentity; exports.writeInlinePlay = writeInlinePlay; exports.writePlayRunIdFile = writePlayRunIdFile; exports.writePlayRunReceipt = writePlayRunReceipt;