deepline 0.3.409 → 0.3.411

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/dist/bundling-sources/sdk/src/agent-runtime.ts +18 -1
  2. package/dist/bundling-sources/sdk/src/client.ts +206 -333
  3. package/dist/bundling-sources/sdk/src/compat.ts +45 -2
  4. package/dist/bundling-sources/sdk/src/db/query.ts +9 -10
  5. package/dist/bundling-sources/sdk/src/http.ts +38 -20
  6. package/dist/bundling-sources/sdk/src/index.ts +4 -5
  7. package/dist/bundling-sources/sdk/src/play.ts +10 -10
  8. package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +6 -4
  9. package/dist/bundling-sources/sdk/src/plays/check-local-play-graph.ts +114 -0
  10. package/dist/bundling-sources/sdk/src/plays/client.ts +431 -0
  11. package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +2 -2
  12. package/dist/bundling-sources/sdk/src/plays/run-request.ts +106 -16
  13. package/dist/bundling-sources/sdk/src/release.ts +13 -7
  14. package/dist/bundling-sources/sdk/src/runs/read-errors.ts +8 -0
  15. package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +124 -13
  16. package/dist/bundling-sources/sdk/src/tool-calls.ts +108 -19
  17. package/dist/bundling-sources/sdk/src/types.ts +18 -0
  18. package/dist/bundling-sources/shared_libs/integration-contracts/execute-retry-contract.ts +37 -0
  19. package/dist/bundling-sources/shared_libs/integration-contracts/package.json +3 -0
  20. package/dist/bundling-sources/shared_libs/monitors/package.json +1 -1
  21. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +3 -1
  22. package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +1 -1
  23. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +277 -76
  24. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
  25. package/dist/bundling-sources/shared_libs/play-runtime/dataset-row-input.ts +124 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +6 -62
  27. package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +1 -0
  28. package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +67 -0
  29. package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +64 -6
  30. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +1 -5
  31. package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +1 -1
  32. package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +3 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +10 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +3 -0
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/egress-probe.ts +3 -0
  36. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +26 -16
  37. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +36 -11
  38. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +35 -0
  39. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +21 -0
  40. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +21 -6
  41. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +11 -2
  42. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +85 -20
  43. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +71 -13
  44. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-execution-queries.ts +100 -0
  45. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +9 -5
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +337 -146
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +26 -12
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +3 -1
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +425 -102
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +4 -0
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +9 -0
  53. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +181 -124
  54. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +152 -0
  55. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +5 -3
  56. package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +31 -0
  57. package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +10 -0
  58. package/dist/bundling-sources/shared_libs/plays/ambiguous-write-error.ts +25 -0
  59. package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +4 -0
  60. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +63 -68
  61. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +129 -63
  62. package/dist/bundling-sources/shared_libs/plays/contracts.ts +14 -0
  63. package/dist/bundling-sources/shared_libs/plays/enrich-play-compiler.ts +58 -16
  64. package/dist/bundling-sources/shared_libs/plays/fetch-http-error.ts +50 -0
  65. package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +351 -0
  66. package/dist/bundling-sources/shared_libs/plays/tool-list-getter-mode.ts +9 -0
  67. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
  68. package/dist/cli/auth-M7TBLW55.js +40 -0
  69. package/dist/cli/{auth-5HIIACF7.mjs → auth-YD6ZTMB2.mjs} +6 -6
  70. package/dist/cli/{billing-4275N7FL.js → billing-2L3MOB42.js} +84 -84
  71. package/dist/cli/{billing-EVZ3ZWKC.mjs → billing-ZT46GV4C.mjs} +8 -8
  72. package/dist/cli/{chunk-ZAAKSJAS.js → chunk-27GJKC5Q.js} +17 -10
  73. package/dist/cli/{chunk-UHNDVD3P.js → chunk-2H4EY7KH.js} +100 -41
  74. package/dist/cli/{chunk-GAICVLKL.js → chunk-2NI6DHN7.js} +2 -2
  75. package/dist/cli/{chunk-JGHG4NBA.js → chunk-2WUY3VNK.js} +19 -4
  76. package/dist/cli/{chunk-FHPCKULR.mjs → chunk-4BA6ATHA.mjs} +2 -2
  77. package/dist/cli/{chunk-RTCDW2GU.js → chunk-4O4WNFFC.js} +170 -49
  78. package/dist/cli/{chunk-OSDXE27V.mjs → chunk-4PG4ARL2.mjs} +17 -10
  79. package/dist/cli/{chunk-AU4OFDFX.js → chunk-5IGDNBG7.js} +26 -26
  80. package/dist/cli/{chunk-WYQO2CBS.mjs → chunk-5LRWWMRV.mjs} +149 -28
  81. package/dist/cli/{chunk-PMVFAYL7.mjs → chunk-63ILLN5H.mjs} +2 -2
  82. package/dist/cli/chunk-6AUE6JXY.js +35 -0
  83. package/dist/cli/chunk-7DSMMCXP.js +501 -0
  84. package/dist/cli/{chunk-6BJK4EJ3.mjs → chunk-AARWVK4C.mjs} +2132 -65
  85. package/dist/cli/{chunk-FERRDNMO.js → chunk-AD47BXN2.js} +5 -5
  86. package/dist/cli/{chunk-J6DCKJNM.mjs → chunk-BJV3VSKE.mjs} +16 -1
  87. package/dist/cli/{chunk-S6R3OX7B.js → chunk-E4CABWXL.js} +25 -2
  88. package/dist/cli/{chunk-NXGCO4JB.mjs → chunk-E4IXDAZI.mjs} +5 -0
  89. package/dist/cli/{chunk-BEVLCKXG.mjs → chunk-E4KBNNNB.mjs} +1 -1
  90. package/dist/cli/{chunk-2PRO2JTX.mjs → chunk-E52TKKVI.mjs} +36 -284
  91. package/dist/cli/chunk-FR2ILQ4G.mjs +8 -0
  92. package/dist/cli/{chunk-2GI3QD3L.js → chunk-FRVPOXGB.js} +644 -330
  93. package/dist/cli/chunk-G43JLBDE.mjs +501 -0
  94. package/dist/cli/{chunk-BZAMOCPA.mjs → chunk-IMZ56EOH.mjs} +3 -3
  95. package/dist/cli/chunk-IPGV6VFA.mjs +6084 -0
  96. package/dist/cli/{chunk-IT3XBJQR.mjs → chunk-IR3AKJAY.mjs} +330 -625
  97. package/dist/cli/chunk-J33TSWO5.js +8 -0
  98. package/dist/cli/chunk-JQMZUWNM.mjs +35 -0
  99. package/dist/cli/chunk-JYHSEGRM.js +6084 -0
  100. package/dist/cli/{chunk-JI2B4RZP.mjs → chunk-KCC3FKIW.mjs} +71 -12
  101. package/dist/cli/{chunk-6IKARAYD.mjs → chunk-L2VKAASU.mjs} +23 -0
  102. package/dist/cli/{chunk-O3VSXP2F.js → chunk-LWBM5FFL.js} +50 -50
  103. package/dist/cli/{chunk-VWBTTJYQ.mjs → chunk-M6OASCVL.mjs} +6 -3
  104. package/dist/cli/{chunk-YHPYUZZX.mjs → chunk-MAMVGOSC.mjs} +1 -1
  105. package/dist/cli/{chunk-Q2E4E4FJ.js → chunk-NPBJI7RE.js} +8 -8
  106. package/dist/cli/chunk-NQWIZ5PZ.js +313 -0
  107. package/dist/cli/{chunk-HQXL5526.mjs → chunk-NUX2QHNC.mjs} +1 -1
  108. package/dist/cli/{chunk-TQNHMWUR.mjs → chunk-OGSXENOF.mjs} +5 -2
  109. package/dist/cli/{chunk-SEFMGO3Z.js → chunk-OQQOXSYA.js} +2184 -117
  110. package/dist/cli/{chunk-FJCIUF34.js → chunk-OZSC6CEW.js} +128 -376
  111. package/dist/cli/{chunk-NZSF57UO.mjs → chunk-PO2VU6WV.mjs} +2 -2
  112. package/dist/cli/{chunk-7P5AA3SN.js → chunk-PPDBRJRW.js} +6 -1
  113. package/dist/cli/{chunk-ILHRA7AD.js → chunk-QADCFSGH.js} +7 -7
  114. package/dist/cli/{chunk-N44JHMKY.mjs → chunk-RFES6Q2J.mjs} +452 -138
  115. package/dist/cli/{chunk-DEC3JECC.js → chunk-RMINBDYY.js} +5 -2
  116. package/dist/cli/{chunk-WLOCMJWV.js → chunk-TPFD4F5S.js} +426 -721
  117. package/dist/cli/{chunk-V76R6HMV.js → chunk-U5AQKE3T.js} +1029 -806
  118. package/dist/cli/{chunk-PBZYY7VZ.mjs → chunk-UAEVKAUR.mjs} +734 -511
  119. package/dist/cli/{chunk-WHG43Z67.js → chunk-VGHWJL4W.js} +11 -8
  120. package/dist/cli/chunk-VKKVSFRD.js +62 -0
  121. package/dist/cli/{chunk-GSK6NHVM.js → chunk-WU4U6VSB.js} +5 -5
  122. package/dist/cli/chunk-XAB47ZRV.mjs +313 -0
  123. package/dist/cli/{chunk-JRAVVJ3T.mjs → chunk-XJD6LZCO.mjs} +2 -2
  124. package/dist/cli/chunk-ZCALLYF6.mjs +62 -0
  125. package/dist/cli/{chunk-YD7B53RW.js → chunk-ZHWBU36H.js} +12 -12
  126. package/dist/cli/{csv-A2MP6EFV.mjs → csv-BKNRRW7D.mjs} +5 -5
  127. package/dist/cli/{csv-BBOTCGQY.js → csv-SVDP2EU7.js} +14 -14
  128. package/dist/cli/{db-3W5DMTUX.mjs → db-LU4KLRM6.mjs} +15 -20
  129. package/dist/cli/{db-G4CODDCA.js → db-OQ6S7TTZ.js} +42 -47
  130. package/dist/cli/{describe-PQTQ5B6F.js → describe-45TGETKR.js} +27 -22
  131. package/dist/cli/{describe-XYJ2ZT4M.mjs → describe-U4KOGDRA.mjs} +20 -15
  132. package/dist/cli/describe-core.d.mts +2 -2
  133. package/dist/cli/describe-core.d.ts +2 -2
  134. package/dist/cli/describe-core.js +6 -6
  135. package/dist/cli/describe-core.mjs +5 -5
  136. package/dist/cli/{executions-UR67CA5H.mjs → executions-2GAAUXLA.mjs} +8 -8
  137. package/dist/cli/{executions-TLANVR7Y.js → executions-VZN56VRC.js} +10 -10
  138. package/dist/cli/{feedback-6C2YTRJL.js → feedback-NS76B5GU.js} +13 -9
  139. package/dist/cli/{feedback-WHCMGEIL.mjs → feedback-XW5IWA5R.mjs} +11 -7
  140. package/dist/cli/{git-GWLB6VSA.mjs → git-CLI66XP6.mjs} +6 -6
  141. package/dist/cli/git-VGYRGFEN.js +24 -0
  142. package/dist/cli/index.js +236 -348
  143. package/dist/cli/index.mjs +162 -274
  144. package/dist/cli/{legacy-noops-ZUFA7RWI.js → legacy-noops-HCFB3ZOV.js} +9 -9
  145. package/dist/cli/{legacy-noops-KF4XIFEF.mjs → legacy-noops-ODDOMLBL.mjs} +6 -6
  146. package/dist/cli/{monitors-TB3K2IVE.js → monitors-7WXQ7JFT.js} +94 -94
  147. package/dist/cli/{monitors-6UOIDIMB.mjs → monitors-ZXX456TE.mjs} +8 -8
  148. package/dist/cli/{org-CKWMBPIR.js → org-YLX5PHBQ.js} +68 -68
  149. package/dist/cli/{org-WGHHMVDZ.mjs → org-YUN3TLNP.mjs} +8 -8
  150. package/dist/cli/{play-LYPAXCLD.mjs → play-LL73A7EP.mjs} +533 -98
  151. package/dist/cli/{play-N2B3KAVS.js → play-YGOXL52D.js} +1067 -632
  152. package/dist/cli/{providers-6DI5BVZJ.mjs → providers-35QSAUHL.mjs} +8 -8
  153. package/dist/cli/{providers-UR42MD6Z.js → providers-RHCIU2PX.js} +11 -11
  154. package/dist/cli/{quickstart-MNA2S6PO.mjs → quickstart-6BN3LCZH.mjs} +5 -5
  155. package/dist/cli/{quickstart-FCJG4XGB.js → quickstart-ORMM4NRK.js} +7 -7
  156. package/dist/cli/search-EWDMUPHR.js +30 -0
  157. package/dist/cli/{search-VPPYUJ2M.mjs → search-GAERWLSE.mjs} +9 -9
  158. package/dist/cli/{secrets-QOSMVO36.js → secrets-3AFCTGT7.js} +17 -17
  159. package/dist/cli/{secrets-DRI4W7Z5.mjs → secrets-FCL5PALY.mjs} +8 -8
  160. package/dist/cli/sessions-3OEHEQG7.js +16 -0
  161. package/dist/cli/{sessions-DQNUKP43.mjs → sessions-RSSL7I7O.mjs} +6 -6
  162. package/dist/cli/{settings-DWDK3Y2R.mjs → settings-GE4NRE7Y.mjs} +12 -12
  163. package/dist/cli/{settings-JUGGCOPS.js → settings-RX5K4I7H.js} +79 -79
  164. package/dist/cli/{setup-AWBHNYXK.js → setup-N3ZNAEL5.js} +45 -44
  165. package/dist/cli/{setup-D5DWVNY4.mjs → setup-X3RXGG4F.mjs} +11 -10
  166. package/dist/cli/{skills-YV2XR35J.mjs → skills-5JEAJBDE.mjs} +7 -7
  167. package/dist/cli/skills-VAAQVEQC.js +29 -0
  168. package/dist/cli/tools-BYYOT2DU.js +44 -0
  169. package/dist/cli/{tools-VFJYHNV2.mjs → tools-JOKUWEBZ.mjs} +19 -14
  170. package/dist/cli/update-36G4ZD7B.js +31 -0
  171. package/dist/cli/{update-IM6VOTGL.mjs → update-UBHEVFR3.mjs} +11 -9
  172. package/dist/cli/{workflow-26URBWPV.mjs → workflow-FR6EXAXF.mjs} +44 -20
  173. package/dist/cli/{workflow-3BS6U6SL.js → workflow-SZAVOHN6.js} +54 -30
  174. package/dist/{client-BfInrZPB.d.mts → client-74k4IPh6.d.mts} +135 -54
  175. package/dist/{client-BMjJFpan.d.ts → client-C1IK1f8c.d.ts} +135 -54
  176. package/dist/{compiler-manifest-Ycx-hoAr.d.mts → compiler-manifest-lzWpbV3w.d.mts} +83 -66
  177. package/dist/{compiler-manifest-Ycx-hoAr.d.ts → compiler-manifest-lzWpbV3w.d.ts} +83 -66
  178. package/dist/{index-CZXgiN3E.d.mts → index-C8Cy-YTm.d.ts} +5 -1
  179. package/dist/{index-NPG5pqxQ.d.ts → index-CtNK-0nI.d.mts} +5 -1
  180. package/dist/index.d.mts +47 -9
  181. package/dist/index.d.ts +47 -9
  182. package/dist/index.js +17 -14
  183. package/dist/index.mjs +13 -10
  184. package/dist/install-integrity.json +118 -102
  185. package/dist/plays/bundle-play-file.d.mts +3 -3
  186. package/dist/plays/bundle-play-file.d.ts +3 -3
  187. package/dist/plays/bundle-play-file.mjs +5 -4
  188. package/dist/plays/csv-data-input.js +3 -3
  189. package/dist/plays/csv-data-input.mjs +2 -2
  190. package/dist/plays/play-description.d.mts +2 -2
  191. package/dist/plays/play-description.d.ts +2 -2
  192. package/dist/plays/run-request.d.mts +2 -2
  193. package/dist/plays/run-request.d.ts +2 -2
  194. package/dist/plays/run-request.js +11 -3
  195. package/dist/plays/run-request.mjs +10 -2
  196. package/dist/release.d.mts +15 -6
  197. package/dist/release.d.ts +15 -6
  198. package/dist/release.js +2 -2
  199. package/dist/release.mjs +1 -1
  200. package/package.json +2 -2
  201. package/dist/cli/auth-F6BX32XZ.js +0 -40
  202. package/dist/cli/chunk-264PC2RN.mjs +0 -83
  203. package/dist/cli/chunk-44ZTYHMQ.mjs +0 -155
  204. package/dist/cli/chunk-53HN7WZN.js +0 -392
  205. package/dist/cli/chunk-7AALNGTA.mjs +0 -392
  206. package/dist/cli/chunk-ALD4COBH.js +0 -155
  207. package/dist/cli/chunk-CLJGSOVM.mjs +0 -1716
  208. package/dist/cli/chunk-WNUR6VP5.js +0 -83
  209. package/dist/cli/chunk-Z4VNJOF7.js +0 -1716
  210. package/dist/cli/git-VQFF6D7C.js +0 -24
  211. package/dist/cli/search-NCEEONMQ.js +0 -30
  212. package/dist/cli/sessions-3WYKQABW.js +0 -16
  213. package/dist/cli/skills-AKPAJVSO.js +0 -29
  214. package/dist/cli/tools-RBKEK6PM.js +0 -39
  215. package/dist/cli/update-VFNUBLDA.js +0 -29
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  addDescribeOptions,
3
3
  recordPlayTermination
4
- } from "./chunk-OSDXE27V.mjs";
4
+ } from "./chunk-4PG4ARL2.mjs";
5
5
  import {
6
6
  registerDeprecatedSearchCommand
7
- } from "./chunk-7AALNGTA.mjs";
7
+ } from "./chunk-IPGV6VFA.mjs";
8
8
  import {
9
9
  handleDeploymentGet,
10
10
  handleDeploymentsList
11
- } from "./chunk-NZSF57UO.mjs";
11
+ } from "./chunk-PO2VU6WV.mjs";
12
12
  import {
13
13
  buildPlayDashboardUrl
14
14
  } from "./chunk-IHG7UAHD.mjs";
@@ -23,16 +23,17 @@ import {
23
23
  listPlayFileExports,
24
24
  parsePlaySourceForAnalysis,
25
25
  resolveEnabledExecutionProfile
26
- } from "./chunk-6BJK4EJ3.mjs";
26
+ } from "./chunk-AARWVK4C.mjs";
27
27
  import "./chunk-H7HIDGZ7.mjs";
28
+ import "./chunk-FR2ILQ4G.mjs";
28
29
  import {
29
30
  parseCsvDataInput
30
- } from "./chunk-HQXL5526.mjs";
31
+ } from "./chunk-NUX2QHNC.mjs";
31
32
  import {
32
33
  pinLocalPlayImports,
33
34
  planLocalPlayExecution
34
35
  } from "./chunk-ERFN2QY4.mjs";
35
- import "./chunk-CLJGSOVM.mjs";
36
+ import "./chunk-ZCALLYF6.mjs";
36
37
  import {
37
38
  DeeplineClient,
38
39
  RUN_EVENT_SEARCH_KIND_VALUES,
@@ -43,12 +44,14 @@ import {
43
44
  isTransientPlayRunReadError,
44
45
  logLevelReaches,
45
46
  logProvenanceReaches,
47
+ normalizePlayStatus,
46
48
  normalizeRunEventOperationRequest,
47
49
  parseLogLevel
48
- } from "./chunk-PBZYY7VZ.mjs";
49
- import "./chunk-6IKARAYD.mjs";
50
+ } from "./chunk-UAEVKAUR.mjs";
51
+ import "./chunk-L2VKAASU.mjs";
50
52
  import {
51
53
  CSV_DATA_INPUT_KEY,
54
+ CliPlayAdmissionUnsupportedError,
52
55
  buildNamedPlayRunRequest,
53
56
  decodePlayRunPublicStatus,
54
57
  fileInputBindingsFromPlaySchema,
@@ -56,20 +59,26 @@ import {
56
59
  setDottedInputValue,
57
60
  stageFileInputs,
58
61
  stagedFileContentType
59
- } from "./chunk-JI2B4RZP.mjs";
62
+ } from "./chunk-KCC3FKIW.mjs";
60
63
  import {
61
64
  CSV_HEADER_MATCHING_NOTE,
62
65
  playInputExampleArgs
63
66
  } from "./chunk-EIMG75BT.mjs";
64
67
  import "./chunk-UBKA33KY.mjs";
65
68
  import {
69
+ checkPlayRunCompatibility,
70
+ usesInlinePlayAdmission
71
+ } from "./chunk-JQMZUWNM.mjs";
72
+ import {
73
+ isCliTraceEnabled,
66
74
  recordCliTrace,
75
+ resolveCliMaintenancePolicy,
67
76
  traceCliSpan
68
- } from "./chunk-J6DCKJNM.mjs";
77
+ } from "./chunk-BJV3VSKE.mjs";
69
78
  import {
70
79
  createCliProgress,
71
80
  getActiveCliProgress
72
- } from "./chunk-44ZTYHMQ.mjs";
81
+ } from "./chunk-IR3AKJAY.mjs";
73
82
  import {
74
83
  argsWantJson,
75
84
  csvSafeJsonString,
@@ -84,16 +93,16 @@ import {
84
93
  printJsonError,
85
94
  renderCommandEnvelopeText,
86
95
  shouldEmitJson
87
- } from "./chunk-JRAVVJ3T.mjs";
96
+ } from "./chunk-XJD6LZCO.mjs";
88
97
  import {
89
98
  fetchWithDeploymentProtection
90
- } from "./chunk-2PRO2JTX.mjs";
91
- import "./chunk-YHPYUZZX.mjs";
99
+ } from "./chunk-E52TKKVI.mjs";
100
+ import "./chunk-MAMVGOSC.mjs";
92
101
  import "./chunk-DLIRSHV6.mjs";
93
102
  import {
94
103
  DeeplineError
95
- } from "./chunk-NXGCO4JB.mjs";
96
- import "./chunk-TQNHMWUR.mjs";
104
+ } from "./chunk-E4IXDAZI.mjs";
105
+ import "./chunk-OGSXENOF.mjs";
97
106
  import "./chunk-WZYKRD7T.mjs";
98
107
  import {
99
108
  __commonJS,
@@ -7886,7 +7895,7 @@ function parsePlayRunOptions(args, initialInput = null) {
7886
7895
  headers
7887
7896
  };
7888
7897
  }
7889
- function resolvePlayRunCliOptions(target, options, inputArgs = []) {
7898
+ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePolicy) {
7890
7899
  const stringOption = (value, flag) => {
7891
7900
  if (value !== void 0 && !value.trim())
7892
7901
  throw new Error(`${flag} requires a non-empty value.`);
@@ -7998,6 +8007,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
7998
8007
  );
7999
8008
  return {
8000
8009
  ...base,
8010
+ ...maintenancePolicy ? { maintenancePolicy } : {},
8001
8011
  target: resolvedTarget,
8002
8012
  dryRun,
8003
8013
  input: base.input,
@@ -8036,6 +8046,79 @@ function playAuthoringGraphPath(parent, filePath) {
8036
8046
  ).replaceAll("\\", "/");
8037
8047
  }
8038
8048
 
8049
+ // src/plays/check-local-play-graph.ts
8050
+ async function checkLocalPlayGraph(input) {
8051
+ const { client, graph } = input;
8052
+ const nodesByPath = new Map(
8053
+ [...graph.nodes.values()].map((node) => [node.filePath, node])
8054
+ );
8055
+ const importedPlaysFor = (node) => {
8056
+ const imported = /* @__PURE__ */ new Set();
8057
+ const collect = (parent) => {
8058
+ for (const dependency of parent.importedPlayDependencies) {
8059
+ if (imported.has(dependency.filePath)) continue;
8060
+ const child = nodesByPath.get(dependency.filePath);
8061
+ if (!child)
8062
+ throw new Error(
8063
+ `Missing bundled Play dependency ${dependency.filePath}.`
8064
+ );
8065
+ imported.add(dependency.filePath);
8066
+ collect(child);
8067
+ }
8068
+ };
8069
+ collect(node);
8070
+ return [...imported].map((filePath) => {
8071
+ const child = nodesByPath.get(filePath);
8072
+ return {
8073
+ playName: child.playName,
8074
+ sourceCode: child.sourceCode,
8075
+ sourcePath: playAuthoringGraphPath(node, child.filePath)
8076
+ };
8077
+ });
8078
+ };
8079
+ const checkNode = (node) => {
8080
+ const name = node.playName ?? (node === graph.root ? input.rootPlayName : null);
8081
+ if (!name)
8082
+ throw new Error(`Bundled Play ${node.filePath} has no declared name.`);
8083
+ const importedPlays = importedPlaysFor(node);
8084
+ const exportName = node === graph.root ? input.exportName : node.artifact.exportName ?? "default";
8085
+ return client.checkPlayArtifact({
8086
+ name,
8087
+ sourceCode: node.sourceCode,
8088
+ sourceFiles: node.sourceFiles,
8089
+ description: node.playDescription ?? void 0,
8090
+ artifact: input.prepareArtifact?.(node.artifact) ?? node.artifact,
8091
+ ...exportName === "default" ? {} : { exportName },
8092
+ ...importedPlays.length ? { importedPlays } : {},
8093
+ ...input.integrationMode ? { integrationMode: input.integrationMode } : {}
8094
+ });
8095
+ };
8096
+ if ([...graph.nodes.values()].some(
8097
+ (node) => (node.artifact.compatibility.authoringContractEdition ?? 1) >= 10
8098
+ )) {
8099
+ const checked = /* @__PURE__ */ new Set();
8100
+ const checkChildren = async (node) => {
8101
+ if (checked.has(node.filePath)) return null;
8102
+ checked.add(node.filePath);
8103
+ for (const dependency of node.importedPlayDependencies) {
8104
+ const child = nodesByPath.get(dependency.filePath);
8105
+ if (!child)
8106
+ throw new Error(
8107
+ `Missing bundled Play dependency ${dependency.filePath}.`
8108
+ );
8109
+ const failure2 = await checkChildren(child);
8110
+ if (failure2) return failure2;
8111
+ }
8112
+ if (node === graph.root) return null;
8113
+ const result = await checkNode(node);
8114
+ return result.valid ? null : { result, failedChild: node };
8115
+ };
8116
+ const failure = await checkChildren(graph.root);
8117
+ if (failure) return failure;
8118
+ }
8119
+ return { result: await checkNode(graph.root) };
8120
+ }
8121
+
8039
8122
  // src/cli/renderers/local-play-execution.ts
8040
8123
  function renderLocalPlayExecutionPlan(plan, options = {}) {
8041
8124
  if (options.dryRun) {
@@ -9005,20 +9088,11 @@ function isRetryablePendingStartFailure(status) {
9005
9088
  if (status.runId && status.runId !== "pending") return false;
9006
9089
  return isTransientPlayRunReadError(new Error(playStatusErrorText(status)));
9007
9090
  }
9008
- function pendingStartFailureStatus(input) {
9009
- const message = input.error instanceof Error ? input.error.message : String(input.error);
9010
- return {
9011
- runId: "pending",
9012
- name: input.playName,
9013
- playName: input.playName,
9014
- dashboardUrl: input.dashboardUrl,
9015
- status: "failed",
9016
- progress: {
9017
- status: "failed",
9018
- logs: [],
9019
- error: message
9020
- }
9021
- };
9091
+ function isAmbiguousPlayStartOutcomeError(error) {
9092
+ if (error instanceof DeeplineError && typeof error.statusCode === "number") {
9093
+ return error.statusCode >= 500;
9094
+ }
9095
+ return true;
9022
9096
  }
9023
9097
  var TERMINAL_PLAY_STATUSES = /* @__PURE__ */ new Set([
9024
9098
  "completed",
@@ -9026,8 +9100,39 @@ var TERMINAL_PLAY_STATUSES = /* @__PURE__ */ new Set([
9026
9100
  "cancelled"
9027
9101
  ]);
9028
9102
  var PLAY_START_TRANSIENT_RETRY_DELAYS_MS = [500, 1500];
9103
+ var PLAY_START_STREAM_TERMINAL_WINDOW_MS = 2e3;
9029
9104
  var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
9030
9105
  var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
9106
+ var RetryablePlayStartAttemptError = class extends Error {
9107
+ constructor(originalError) {
9108
+ super(
9109
+ originalError instanceof Error ? originalError.message : String(originalError)
9110
+ );
9111
+ this.originalError = originalError;
9112
+ this.name = "RetryablePlayStartAttemptError";
9113
+ }
9114
+ };
9115
+ var PlayStartOutcomeUnknownError = class extends DeeplineError {
9116
+ retryable = false;
9117
+ constructor(playName, cause) {
9118
+ const causeMessage = cause instanceof Error ? cause.message : String(cause);
9119
+ const recoveryCommand = `deepline runs list --play ${shellQuote(playName)} --json`;
9120
+ super(
9121
+ `Play ${playName} may have started, but the CLI did not receive confirmation. Do not run it again until you inspect the original workspace with: ${recoveryCommand}`,
9122
+ cause instanceof DeeplineError ? cause.statusCode : void 0,
9123
+ "PLAY_START_OUTCOME_UNKNOWN",
9124
+ {
9125
+ outcome: "unknown",
9126
+ playName,
9127
+ recoveryCommand,
9128
+ recoveryScope: "same_authenticated_host_and_workspace",
9129
+ causeMessage
9130
+ }
9131
+ );
9132
+ this.name = "PlayStartOutcomeUnknownError";
9133
+ Object.defineProperty(this, "cause", { value: cause, configurable: true });
9134
+ }
9135
+ };
9031
9136
  function watchSurfaceReaches(state, provenance, level) {
9032
9137
  const minimumLevel = state.logLevel ?? (state.verbose ? "debug" : "info");
9033
9138
  if (!logLevelReaches(level, minimumLevel)) {
@@ -9593,11 +9698,26 @@ async function waitForPlayCompletionByWatch(input) {
9593
9698
  await input.onRunAdmitted?.(input.workflowId);
9594
9699
  };
9595
9700
  const withDashboardUrl = (status) => input.dashboardUrl ? { ...status, dashboardUrl: input.dashboardUrl } : status;
9701
+ const finishTerminalStatus = async (status) => {
9702
+ if (status.runId === input.workflowId && statusProvesPlayRunExecution(status.status)) {
9703
+ await confirmAdmission();
9704
+ }
9705
+ if (!TERMINAL_PLAY_STATUSES.has(status.status)) return null;
9706
+ const resolved = input.fullJson === void 0 ? status : await resolvePlayRunOutputStatus({
9707
+ client: input.client,
9708
+ status,
9709
+ fullJson: input.fullJson,
9710
+ jsonOutput: input.jsonOutput,
9711
+ fromDurableStatus: true
9712
+ });
9713
+ return withDashboardUrl(resolved);
9714
+ };
9596
9715
  const fetchTerminalStatus = async () => {
9597
9716
  let refreshed;
9598
9717
  try {
9599
9718
  refreshed = await input.client.getPlayStatus(input.workflowId, {
9600
- billing: false
9719
+ billing: false,
9720
+ ...input.fullJson === void 0 ? {} : { full: input.fullJson }
9601
9721
  });
9602
9722
  } catch (error) {
9603
9723
  if (isTransientPlayRunReadError(error) || isAdmittedRunVisibilityDelay(error)) {
@@ -9605,10 +9725,7 @@ async function waitForPlayCompletionByWatch(input) {
9605
9725
  }
9606
9726
  throw error;
9607
9727
  }
9608
- if (refreshed.runId === input.workflowId && statusProvesPlayRunExecution(refreshed.status)) {
9609
- await confirmAdmission();
9610
- }
9611
- return TERMINAL_PLAY_STATUSES.has(refreshed.status) ? withDashboardUrl(refreshed) : null;
9728
+ return finishTerminalStatus(refreshed);
9612
9729
  };
9613
9730
  const handleLiveEvent = async (event) => {
9614
9731
  assertPlayWaitNotTimedOut({ ...input, lastPhase });
@@ -9664,7 +9781,7 @@ async function waitForPlayCompletionByWatch(input) {
9664
9781
  }
9665
9782
  const finalStatus = getFinalStatusFromLiveEvent(event);
9666
9783
  if (event.type === "play.run.final_status" && finalStatus) {
9667
- return withDashboardUrl(finalStatus);
9784
+ return input.fullJson === void 0 ? withDashboardUrl(finalStatus) : fetchTerminalStatus();
9668
9785
  }
9669
9786
  const status = getStatusFromLiveEvent(event);
9670
9787
  if (status && TERMINAL_PLAY_STATUSES.has(status)) {
@@ -9679,7 +9796,37 @@ async function waitForPlayCompletionByWatch(input) {
9679
9796
  let terminalFromWatch = null;
9680
9797
  for await (const event of input.client.watchRunEvents(
9681
9798
  input.workflowId,
9682
- { signal: controller.signal }
9799
+ {
9800
+ signal: controller.signal,
9801
+ deferLogs: !input.emitLogs,
9802
+ omitTerminalLogs: !input.emitLogs,
9803
+ ...isCliTraceEnabled() ? {
9804
+ onPoll: (observation) => {
9805
+ recordCliTrace({
9806
+ phase: "play_watch_poll",
9807
+ workflowId: input.workflowId,
9808
+ ms: observation.durationMs,
9809
+ poll: observation.poll,
9810
+ httpStatus: observation.status,
9811
+ serverTiming: observation.serverTiming
9812
+ });
9813
+ }
9814
+ } : {},
9815
+ terminalStatus: {
9816
+ full: input.fullJson,
9817
+ billing: false,
9818
+ onStatus: async (status) => {
9819
+ recordCliTrace({
9820
+ phase: "play_watch_terminal_status",
9821
+ workflowId: input.workflowId,
9822
+ full: input.fullJson === true
9823
+ });
9824
+ terminalStatusRead = Promise.resolve(
9825
+ await finishTerminalStatus(status)
9826
+ );
9827
+ }
9828
+ }
9829
+ }
9683
9830
  )) {
9684
9831
  const terminal3 = await handleLiveEvent(event);
9685
9832
  if (terminal3) terminalFromWatch = terminal3;
@@ -9716,18 +9863,183 @@ async function waitForPlayCompletionByWatch(input) {
9716
9863
  controller.abort();
9717
9864
  }
9718
9865
  }
9866
+ async function startAndWaitForPlayCompletion(input) {
9867
+ const startedAt = Date.now();
9868
+ const controller = new AbortController();
9869
+ let timedOut = false;
9870
+ const timeout = input.waitTimeoutMs === null ? null : setTimeout(
9871
+ () => {
9872
+ timedOut = true;
9873
+ controller.abort();
9874
+ },
9875
+ Math.max(1, input.waitTimeoutMs)
9876
+ );
9877
+ let started;
9878
+ let inlineCompatibility = input.cliAdmission === true;
9879
+ const request = input.request;
9880
+ try {
9881
+ try {
9882
+ started = await input.client.startPlayRun(request, {
9883
+ signal: controller.signal,
9884
+ onSubmission: input.onSubmission,
9885
+ ...input.cliAdmission ? { cliAdmission: true } : {}
9886
+ });
9887
+ } catch (error) {
9888
+ if (!(error instanceof CliPlayAdmissionUnsupportedError)) throw error;
9889
+ await checkPlayRunCompatibility(
9890
+ input.client.baseUrl,
9891
+ input.maintenancePolicy
9892
+ );
9893
+ inlineCompatibility = false;
9894
+ controller.signal.throwIfAborted();
9895
+ started = await input.client.startPlayRun(request, {
9896
+ signal: controller.signal,
9897
+ onSubmission: input.onSubmission
9898
+ });
9899
+ }
9900
+ } catch (error) {
9901
+ if (timedOut) {
9902
+ assertPlayWaitNotTimedOut({
9903
+ workflowId: "",
9904
+ startedAt,
9905
+ waitTimeoutMs: input.waitTimeoutMs
9906
+ });
9907
+ }
9908
+ throw error;
9909
+ } finally {
9910
+ if (timeout) clearTimeout(timeout);
9911
+ }
9912
+ const workflowId = started.workflowId;
9913
+ if (!workflowId || workflowId === "pending") {
9914
+ throw new DeeplineError(
9915
+ "Play admission returned no run id. Check recent runs before submitting again.",
9916
+ void 0,
9917
+ "PLAY_START_MISSING_RUN_ID"
9918
+ );
9919
+ }
9920
+ await input.onRunStarted?.(workflowId);
9921
+ await input.onRunAdmitted?.(workflowId);
9922
+ const dashboardUrl = started.dashboardUrl ?? buildPlayDashboardUrl(input.client.baseUrl, input.playName);
9923
+ if (!input.jsonOutput) {
9924
+ writeStartedPlayRun({
9925
+ runId: workflowId,
9926
+ playName: input.playName,
9927
+ dashboardUrl,
9928
+ inputFieldCount: Object.keys(input.request.input ?? {}).length,
9929
+ jsonOutput: false,
9930
+ progress: input.progress
9931
+ });
9932
+ }
9933
+ openPlayDashboard(dashboardUrl, input.open ?? false);
9934
+ input.progress.phase("running");
9935
+ recordCliTrace({
9936
+ phase: "cli.play_start_admitted",
9937
+ ms: Date.now() - startedAt,
9938
+ ok: true,
9939
+ playName: input.playName,
9940
+ workflowId,
9941
+ inlineCompatibility
9942
+ });
9943
+ const initialTerminal = readRecord(started.finalStatus);
9944
+ const initialPackage = readRecord(initialTerminal?.package) ?? initialTerminal;
9945
+ const initialRun = readRecord(initialPackage?.run);
9946
+ if (initialTerminal && initialRun?.id === workflowId && initialRun.status === "completed" && (initialTerminal.runId === void 0 || initialTerminal.runId === workflowId) && (initialTerminal.status === void 0 || initialTerminal.status === "completed") && input.fullJson === true && started.finalStatusView === "full") {
9947
+ assertPlayWaitNotTimedOut({
9948
+ workflowId,
9949
+ startedAt,
9950
+ waitTimeoutMs: input.waitTimeoutMs
9951
+ });
9952
+ const initialStatus = normalizePlayStatus(initialTerminal);
9953
+ const status2 = await resolvePlayRunOutputStatus({
9954
+ client: input.client,
9955
+ status: initialStatus,
9956
+ fullJson: true,
9957
+ jsonOutput: input.jsonOutput,
9958
+ fromDurableStatus: true
9959
+ });
9960
+ recordCliTrace({
9961
+ phase: "play_watch_terminal_status",
9962
+ workflowId,
9963
+ full: true,
9964
+ source: status2 === initialStatus ? "start_response" : "durable_repair"
9965
+ });
9966
+ const completedStatus = { ...status2, dashboardUrl };
9967
+ return input.request.revisionId ? { ...completedStatus, revisionId: input.request.revisionId } : completedStatus;
9968
+ }
9969
+ const status = await waitForPlayCompletionByWatch({
9970
+ ...input,
9971
+ workflowId,
9972
+ dashboardUrl,
9973
+ startedAt,
9974
+ onRunAdmitted: void 0,
9975
+ state: {
9976
+ emittedRunnerStarted: false,
9977
+ verbose: input.verboseLogs === true,
9978
+ logLevel: input.logLevel ?? "info",
9979
+ lastProgressSignature: null,
9980
+ lastProgressHeartbeatAt: 0,
9981
+ lastStatusHeartbeatAt: 0
9982
+ }
9983
+ });
9984
+ return input.request.revisionId ? { ...status, revisionId: input.request.revisionId } : status;
9985
+ }
9719
9986
  async function startAndWaitForPlayCompletionByStream(input) {
9720
9987
  const prepared = await input.client.preparePlayRunAdmission(input.request, {
9988
+ cliAdmission: input.cliAdmission,
9721
9989
  onSubmission: input.onSubmission
9722
9990
  });
9723
9991
  const pinnedInput = {
9724
9992
  ...input,
9725
9993
  request: prepared.body,
9726
- startStream: prepared.startStream
9994
+ startStream: prepared.startStream,
9995
+ supportsCallerIntent: prepared.supportsCallerIntent
9727
9996
  };
9728
9997
  const retryDelays = prepared.supportsCallerIntent ? PLAY_START_TRANSIENT_RETRY_DELAYS_MS : [];
9729
9998
  for (let attempt = 0; attempt <= retryDelays.length; attempt += 1) {
9730
- const status = await startAndWaitForPlayCompletionByStreamOnce(pinnedInput);
9999
+ let status;
10000
+ try {
10001
+ status = await startAndWaitForPlayCompletionByStreamOnce(pinnedInput);
10002
+ } catch (error) {
10003
+ if (error instanceof CliPlayAdmissionUnsupportedError && input.cliAdmission) {
10004
+ await checkPlayRunCompatibility(
10005
+ input.client.baseUrl,
10006
+ input.maintenancePolicy
10007
+ );
10008
+ return startAndWaitForPlayCompletion({
10009
+ ...input,
10010
+ cliAdmission: false,
10011
+ streamTerminalWindowMs: void 0
10012
+ });
10013
+ }
10014
+ if (!(error instanceof RetryablePlayStartAttemptError)) throw error;
10015
+ const retryDelayMs2 = retryDelays[attempt];
10016
+ if (retryDelayMs2 === void 0) {
10017
+ throw new DeeplineError(
10018
+ `Play ${input.playName} did not start after retrying transient start failures.`,
10019
+ void 0,
10020
+ "PLAY_START_RETRY_EXHAUSTED",
10021
+ {
10022
+ causeMessage: error.originalError instanceof Error ? error.originalError.message : String(error.originalError)
10023
+ }
10024
+ );
10025
+ }
10026
+ if (!input.jsonOutput) {
10027
+ input.progress.writeLine(
10028
+ `[play watch] start response was ambiguous; retrying the same caller intent (${error.message})`
10029
+ );
10030
+ }
10031
+ recordCliTrace({
10032
+ phase: "cli.play_start_stream_retry",
10033
+ ms: 0,
10034
+ ok: true,
10035
+ playName: input.playName,
10036
+ attempt: attempt + 1,
10037
+ reason: error.message,
10038
+ recovery: "same_caller_intent"
10039
+ });
10040
+ await sleep(retryDelayMs2);
10041
+ continue;
10042
+ }
9731
10043
  const retryDelayMs = retryDelays[attempt];
9732
10044
  if (retryDelayMs === void 0 || !isRetryablePendingStartFailure(status)) {
9733
10045
  return status;
@@ -9775,10 +10087,26 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9775
10087
  let eventCount = 0;
9776
10088
  let firstRunIdMs = null;
9777
10089
  let launchConfirmed = false;
10090
+ let terminalWindowExpired = false;
10091
+ let terminalWindowTimer = null;
9778
10092
  const confirmAdmission = async (runId) => {
9779
10093
  if (launchConfirmed || !runId || runId === "pending") return;
9780
10094
  launchConfirmed = true;
9781
10095
  await input.onRunAdmitted?.(runId);
10096
+ recordCliTrace({
10097
+ phase: "cli.play_start_admitted",
10098
+ ms: Date.now() - startedAt,
10099
+ ok: true,
10100
+ playName: input.playName,
10101
+ workflowId: runId,
10102
+ inlineCompatibility: input.cliAdmission === true
10103
+ });
10104
+ if ((input.streamTerminalWindowMs ?? 0) > 0) {
10105
+ terminalWindowTimer = setTimeout(() => {
10106
+ terminalWindowExpired = true;
10107
+ controller.abort();
10108
+ }, input.streamTerminalWindowMs);
10109
+ }
9782
10110
  };
9783
10111
  let lastPhase = null;
9784
10112
  const timeout = input.waitTimeoutMs === null ? null : setTimeout(
@@ -9795,7 +10123,8 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9795
10123
  let refreshed;
9796
10124
  try {
9797
10125
  refreshed = await input.client.getPlayStatus(lastKnownWorkflowId, {
9798
- billing: false
10126
+ billing: false,
10127
+ full: input.fullJson
9799
10128
  });
9800
10129
  } catch (error) {
9801
10130
  if (isTransientPlayRunReadError(error)) {
@@ -9918,11 +10247,18 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9918
10247
  ...launchedRevisionId ? { revisionId: launchedRevisionId } : {}
9919
10248
  };
9920
10249
  }
9921
- const canonicalTerminal = input.request.profile === "absurd" ? await fetchKnownTerminalStatus() : {
9922
- ...finalStatus,
9923
- dashboardUrl,
9924
- ...launchedRevisionId ? { revisionId: launchedRevisionId } : {}
9925
- };
10250
+ let fromDurableStatus = false;
10251
+ let canonicalTerminal;
10252
+ if (input.request.profile === "absurd") {
10253
+ canonicalTerminal = await fetchKnownTerminalStatus();
10254
+ fromDurableStatus = canonicalTerminal !== null;
10255
+ } else {
10256
+ canonicalTerminal = {
10257
+ ...finalStatus,
10258
+ dashboardUrl,
10259
+ ...launchedRevisionId ? { revisionId: launchedRevisionId } : {}
10260
+ };
10261
+ }
9926
10262
  if (!canonicalTerminal) {
9927
10263
  recordCliTrace({
9928
10264
  phase: "cli.play_start_stream_stale_terminal_ignored",
@@ -9937,22 +10273,37 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9937
10273
  });
9938
10274
  continue;
9939
10275
  }
10276
+ const outputTerminal = input.fullJson === true ? await resolvePlayRunOutputStatus({
10277
+ client: input.client,
10278
+ status: canonicalTerminal,
10279
+ fullJson: true,
10280
+ jsonOutput: input.jsonOutput,
10281
+ fromDurableStatus
10282
+ }) : canonicalTerminal;
10283
+ if (input.fullJson === true) {
10284
+ recordCliTrace({
10285
+ phase: "play_watch_terminal_status",
10286
+ workflowId: outputTerminal.runId || lastKnownWorkflowId || void 0,
10287
+ full: true,
10288
+ source: outputTerminal === canonicalTerminal ? fromDurableStatus ? "start_stream_durable" : "start_stream" : "durable_repair"
10289
+ });
10290
+ }
9940
10291
  recordCliTrace({
9941
10292
  phase: "cli.play_start_stream_terminal",
9942
10293
  ms: Date.now() - startedAt,
9943
10294
  ok: true,
9944
10295
  playName: input.playName,
9945
- workflowId: canonicalTerminal.runId || lastKnownWorkflowId || null,
10296
+ workflowId: outputTerminal.runId || lastKnownWorkflowId || null,
9946
10297
  eventCount,
9947
10298
  firstRunIdMs,
9948
10299
  lastPhase
9949
10300
  });
9950
- if (statusProvesPlayRunExecution(canonicalTerminal.status)) {
10301
+ if (statusProvesPlayRunExecution(outputTerminal.status)) {
9951
10302
  await confirmAdmission(lastKnownWorkflowId);
9952
10303
  }
9953
- return canonicalTerminal;
10304
+ return outputTerminal;
9954
10305
  }
9955
- if (lastKnownWorkflowId && launchConfirmed) {
10306
+ if (lastKnownWorkflowId && launchConfirmed && (!input.streamTerminalWindowMs || terminalWindowExpired)) {
9956
10307
  if (timeout) {
9957
10308
  clearTimeout(timeout);
9958
10309
  }
@@ -9965,7 +10316,8 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9965
10316
  workflowId: lastKnownWorkflowId,
9966
10317
  eventCount,
9967
10318
  firstRunIdMs,
9968
- lastPhase
10319
+ lastPhase,
10320
+ handoffReason: terminalWindowExpired ? "terminal_window_elapsed" : "launch_confirmed"
9969
10321
  });
9970
10322
  return waitForPlayCompletionByWatch({
9971
10323
  client: input.client,
@@ -9978,6 +10330,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
9978
10330
  startedAt,
9979
10331
  state,
9980
10332
  progress: input.progress,
10333
+ fullJson: input.fullJson,
9981
10334
  onRunAdmitted: confirmAdmission
9982
10335
  });
9983
10336
  }
@@ -10006,11 +10359,11 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10006
10359
  lastPhase
10007
10360
  });
10008
10361
  }
10009
- if (lastKnownWorkflowId && isTransientPlayRunReadError(error)) {
10362
+ if (lastKnownWorkflowId && (terminalWindowExpired || isTransientPlayRunReadError(error))) {
10010
10363
  if (timeout) {
10011
10364
  clearTimeout(timeout);
10012
10365
  }
10013
- const reason = error instanceof Error ? error.message : String(error);
10366
+ const reason = terminalWindowExpired ? "terminal observation window elapsed" : error instanceof Error ? error.message : String(error);
10014
10367
  if (!input.jsonOutput) {
10015
10368
  process.stderr.write(
10016
10369
  `[play watch] start stream failed after run ${lastKnownWorkflowId}; reconnecting to canonical run stream (${reason})
@@ -10039,10 +10392,11 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10039
10392
  startedAt,
10040
10393
  state,
10041
10394
  progress: input.progress,
10395
+ fullJson: input.fullJson,
10042
10396
  onRunAdmitted: confirmAdmission
10043
10397
  });
10044
10398
  }
10045
- if (!lastKnownWorkflowId && isTransientPlayRunReadError(error)) {
10399
+ if (!lastKnownWorkflowId && isAmbiguousPlayStartOutcomeError(error)) {
10046
10400
  recordCliTrace({
10047
10401
  phase: "cli.play_start_stream_transient_failure",
10048
10402
  ms: Date.now() - startedAt,
@@ -10053,17 +10407,17 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10053
10407
  lastPhase,
10054
10408
  reason: error instanceof Error ? error.message : String(error)
10055
10409
  });
10056
- return pendingStartFailureStatus({
10057
- playName: input.playName,
10058
- dashboardUrl,
10059
- error
10060
- });
10410
+ if (input.supportsCallerIntent) {
10411
+ throw new RetryablePlayStartAttemptError(error);
10412
+ }
10413
+ throw new PlayStartOutcomeUnknownError(input.playName, error);
10061
10414
  }
10062
10415
  throw error;
10063
10416
  } finally {
10064
10417
  if (timeout) {
10065
10418
  clearTimeout(timeout);
10066
10419
  }
10420
+ if (terminalWindowTimer) clearTimeout(terminalWindowTimer);
10067
10421
  }
10068
10422
  if (lastKnownWorkflowId) {
10069
10423
  if (!input.jsonOutput) {
@@ -10080,7 +10434,8 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10080
10434
  eventCount,
10081
10435
  firstRunIdMs,
10082
10436
  lastPhase,
10083
- reason: "stream ended before terminal event"
10437
+ reason: "stream ended before terminal event",
10438
+ ...terminalWindowExpired ? { handoffReason: "terminal_window_elapsed" } : {}
10084
10439
  });
10085
10440
  return waitForPlayCompletionByWatch({
10086
10441
  client: input.client,
@@ -10093,13 +10448,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10093
10448
  startedAt,
10094
10449
  state,
10095
10450
  progress: input.progress,
10451
+ fullJson: input.fullJson,
10096
10452
  onRunAdmitted: confirmAdmission
10097
10453
  });
10098
10454
  }
10099
10455
  const phaseSuffix = lastPhase && lastPhase.trim() ? ` (last observed phase: ${lastPhase.trim()})` : "";
10100
10456
  const idSuffix = lastKnownWorkflowId ? ` runId=${lastKnownWorkflowId}` : "";
10101
- throw new DeeplineError(
10102
- `Play start request ended before terminal status was observed${idSuffix}${phaseSuffix}. If a run id was printed, inspect it with 'deepline runs get <run-id> --full' or continue watching with 'deepline runs watch <run-id>'.`,
10457
+ const endedBeforeConfirmation = new DeeplineError(
10458
+ `Play start request ended before terminal status was observed${idSuffix}${phaseSuffix}.`,
10103
10459
  void 0,
10104
10460
  "PLAY_START_STREAM_ENDED",
10105
10461
  {
@@ -10107,6 +10463,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
10107
10463
  ...lastPhase ? { phase: lastPhase } : {}
10108
10464
  }
10109
10465
  );
10466
+ if (lastKnownWorkflowId) throw endedBeforeConfirmation;
10467
+ if (input.supportsCallerIntent) {
10468
+ throw new RetryablePlayStartAttemptError(endedBeforeConfirmation);
10469
+ }
10470
+ throw new PlayStartOutcomeUnknownError(
10471
+ input.playName,
10472
+ endedBeforeConfirmation
10473
+ );
10110
10474
  }
10111
10475
  function formatInteger(value) {
10112
10476
  return typeof value === "number" && Number.isFinite(value) ? value.toLocaleString("en-US") : String(value ?? "-");
@@ -11861,7 +12225,7 @@ function withRunNavigationLines(lines, status, actionCommands = buildRunNavigati
11861
12225
  function playRunPackageTextLedgerIncomplete(pkg) {
11862
12226
  if (!pkg) return true;
11863
12227
  const steps = readRecordArray(pkg.steps);
11864
- if (steps.length === 0) return true;
12228
+ if (steps.length === 0) return pkg.stepsExpected !== false;
11865
12229
  for (const step of steps) {
11866
12230
  if (step.kind !== "dataset" || step.status !== "completed") continue;
11867
12231
  const output = readRecord(step.output);
@@ -11876,9 +12240,9 @@ async function resolvePlayRunOutputStatus(input) {
11876
12240
  return input.status;
11877
12241
  }
11878
12242
  const streamedPackage = getPlayRunPackage(input.status);
11879
- const refreshForFullJson = input.fullJson && streamedPackage !== null;
12243
+ const refreshForFullJson = input.fullJson && !input.fromDurableStatus;
11880
12244
  const streamedTextPackageIncomplete = input.status.status === "completed" && playRunPackageTextLedgerIncomplete(streamedPackage);
11881
- const refreshFailedTerminal = input.status.status === "failed";
12245
+ const refreshFailedTerminal = input.status.status === "failed" && (!input.fromDurableStatus || readRecord(streamedPackage?.run)?.status !== "failed");
11882
12246
  if (!refreshForFullJson && !streamedTextPackageIncomplete && !refreshFailedTerminal) {
11883
12247
  return input.status;
11884
12248
  }
@@ -13144,45 +13508,61 @@ async function checkOneExportedPlay(input) {
13144
13508
  const authoringErrors = collectPlayGraphAuthoringErrors(graph);
13145
13509
  const client = new DeeplineClient();
13146
13510
  const integrationMode = resolveEvalIntegrationMode();
13147
- const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
13148
- playName: node.playName,
13149
- sourceCode: node.sourceCode,
13150
- sourcePath: playAuthoringGraphPath(graph.root, node.filePath)
13151
- }));
13152
- const result = await client.checkPlayArtifact({
13153
- name: playName,
13154
- sourceCode: graph.root.sourceCode,
13155
- sourceFiles: graph.root.sourceFiles,
13156
- description: graph.root.playDescription ?? void 0,
13157
- artifact: artifactForProductionCompatibilityCheck(graph.root.artifact),
13158
- ...exportName === PLAY_DEFAULT_EXPORT ? {} : { exportName },
13159
- ...importedPlays.length > 0 ? { importedPlays } : {},
13160
- ...integrationMode ? { integrationMode } : {}
13511
+ const checked = await checkLocalPlayGraph({
13512
+ client,
13513
+ graph,
13514
+ rootPlayName: playName,
13515
+ exportName,
13516
+ integrationMode,
13517
+ prepareArtifact: artifactForProductionCompatibilityCheck
13161
13518
  });
13162
- const valid = result.valid && authoringErrors.length === 0;
13519
+ const importedPlayName = checked.failedChild?.playName;
13520
+ const diagnosticPrefix = importedPlayName ? `Imported Play ${importedPlayName}: ` : "";
13521
+ const valid = checked.result.valid && !checked.failedChild && authoringErrors.length === 0;
13522
+ const errors = [
13523
+ ...authoringErrors,
13524
+ ...checked.result.errors.map((error) => `${diagnosticPrefix}${error}`)
13525
+ ];
13163
13526
  return {
13164
13527
  exportName,
13165
13528
  playName,
13166
- ...authoringErrors.length > 0 ? { stage: "authoring" } : {},
13529
+ ...authoringErrors.length > 0 || checked.failedChild ? { stage: "authoring" } : {},
13167
13530
  result: {
13168
- ...result,
13531
+ ...checked.result,
13169
13532
  valid,
13170
- errors: valid ? result.errors : addPlayCheckRepairHints({
13171
- errors: [...authoringErrors, ...result.errors],
13172
- sourceCode: graph.root.sourceCode
13533
+ errors: valid ? checked.result.errors : addPlayCheckRepairHints({
13534
+ errors,
13535
+ sourceCode: checked.failedChild?.sourceCode ?? graph.root.sourceCode
13173
13536
  }),
13174
- toolGetterHints: result.toolGetterHints ?? await buildToolGetterHints(client, result.staticPipeline)
13537
+ ...checked.failedChild && checked.result.issues ? {
13538
+ issues: checked.result.issues.map((issue) => ({
13539
+ ...issue,
13540
+ message: `${diagnosticPrefix}${issue.message}`
13541
+ }))
13542
+ } : {},
13543
+ toolGetterHints: checked.result.toolGetterHints ?? (checked.failedChild ? [] : await buildToolGetterHints(client, checked.result.staticPipeline))
13175
13544
  }
13176
13545
  };
13177
13546
  }
13178
13547
  function playRunClientOptions(options) {
13179
13548
  return options.headers ? { headers: options.headers } : void 0;
13180
13549
  }
13550
+ async function preflightPlayRunTotalBudget(input) {
13551
+ if (input.maxTotalCredits === null) return;
13552
+ await input.client.preparePlayRunAdmission({
13553
+ name: input.playName,
13554
+ maxTotalCredits: input.maxTotalCredits
13555
+ });
13556
+ }
13181
13557
  async function handleFileBackedRun(options, hooks) {
13182
13558
  if (options.target.kind !== "file") {
13183
13559
  throw new Error("Expected a file-backed play run target.");
13184
13560
  }
13185
13561
  let client;
13562
+ let cliAdmission = usesInlinePlayAdmission(
13563
+ "plays run",
13564
+ process.argv.slice(2)
13565
+ );
13186
13566
  const progress = getActiveCliProgress() ?? createCliProgress(!options.jsonOutput);
13187
13567
  const absolutePlayPath = resolve5(options.target.path);
13188
13568
  progress.phase("compiling play");
@@ -13220,6 +13600,18 @@ async function handleFileBackedRun(options, hooks) {
13220
13600
  return 0;
13221
13601
  }
13222
13602
  client = new DeeplineClient(playRunClientOptions(options));
13603
+ if (cliAdmission && (graph.root.importedPlayDependencies.length > 0 || inputContainsLocalFilePath(runtimeInput))) {
13604
+ await checkPlayRunCompatibility(
13605
+ client.baseUrl,
13606
+ options.maintenancePolicy
13607
+ );
13608
+ cliAdmission = false;
13609
+ }
13610
+ await preflightPlayRunTotalBudget({
13611
+ client,
13612
+ playName: graph.root.playName ?? extractPlayName(sourceCode, absolutePlayPath),
13613
+ maxTotalCredits: options.maxTotalCredits
13614
+ });
13223
13615
  const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
13224
13616
  if (canDeferCompilerManifest) {
13225
13617
  recordCliTrace({
@@ -13324,7 +13716,7 @@ async function handleFileBackedRun(options, hooks) {
13324
13716
  const finalStatus = await traceCliSpan(
13325
13717
  "cli.play_start_watch",
13326
13718
  { targetKind: "file", playName },
13327
- () => startAndWaitForPlayCompletionByStream({
13719
+ () => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
13328
13720
  client,
13329
13721
  request: startRequest,
13330
13722
  playName,
@@ -13337,7 +13729,13 @@ async function handleFileBackedRun(options, hooks) {
13337
13729
  progress,
13338
13730
  onRunStarted: hooks?.onRunStarted,
13339
13731
  onSubmission: hooks?.onSubmission,
13340
- onRunAdmitted: hooks?.onRunAdmitted
13732
+ onRunAdmitted: hooks?.onRunAdmitted,
13733
+ maintenancePolicy: options.maintenancePolicy,
13734
+ ...options.runIdFile ? {} : { fullJson: options.fullJson },
13735
+ ...cliAdmission ? {
13736
+ cliAdmission: true,
13737
+ streamTerminalWindowMs: PLAY_START_STREAM_TERMINAL_WINDOW_MS
13738
+ } : {}
13341
13739
  }).catch(async (error) => {
13342
13740
  throw await normalizePlayStartError(client, error, playName);
13343
13741
  })
@@ -13349,12 +13747,12 @@ async function handleFileBackedRun(options, hooks) {
13349
13747
  }
13350
13748
  const outputStatus = withOrdinaryRunAgainCommand(
13351
13749
  withTerminalPlayIdentity(
13352
- await resolvePlayRunOutputStatus({
13750
+ options.runIdFile ? await resolvePlayRunOutputStatus({
13353
13751
  client,
13354
13752
  status: finalStatus,
13355
13753
  fullJson: options.fullJson,
13356
13754
  jsonOutput: options.jsonOutput
13357
- }),
13755
+ }) : finalStatus,
13358
13756
  playName
13359
13757
  ),
13360
13758
  options
@@ -13419,6 +13817,10 @@ async function handleNamedRun(options, hooks) {
13419
13817
  throw new Error("Expected a named play run target.");
13420
13818
  }
13421
13819
  const client = new DeeplineClient(playRunClientOptions(options));
13820
+ let cliAdmission = usesInlinePlayAdmission(
13821
+ "plays run",
13822
+ process.argv.slice(2)
13823
+ );
13422
13824
  const progress = getActiveCliProgress() ?? createCliProgress(!options.jsonOutput);
13423
13825
  const playName = options.target.name;
13424
13826
  const runtimeInput = options.input ? { ...options.input } : {};
@@ -13465,10 +13867,19 @@ async function handleNamedRun(options, hooks) {
13465
13867
  selector: options.revisionSelector
13466
13868
  })
13467
13869
  );
13870
+ await preflightPlayRunTotalBudget({
13871
+ client,
13872
+ playName,
13873
+ maxTotalCredits: options.maxTotalCredits
13874
+ });
13468
13875
  const fileInputBindings = playDetail ? [
13469
13876
  ...fileInputBindingsFromPlaySchema(playDetail.play.inputSchema),
13470
13877
  ...fileInputBindingsFromStaticPipeline(playDetail.play.staticPipeline)
13471
13878
  ] : [];
13879
+ if (cliAdmission && fileInputBindings.length > 0) {
13880
+ await checkPlayRunCompatibility(client.baseUrl, options.maintenancePolicy);
13881
+ cliAdmission = false;
13882
+ }
13472
13883
  const stagedFileInputs = await traceCliSpan(
13473
13884
  "cli.play_stage_inputs",
13474
13885
  {
@@ -13516,7 +13927,7 @@ async function handleNamedRun(options, hooks) {
13516
13927
  const finalStatus = await traceCliSpan(
13517
13928
  "cli.play_start_watch",
13518
13929
  { targetKind: "name", playName },
13519
- () => startAndWaitForPlayCompletionByStream({
13930
+ () => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
13520
13931
  client,
13521
13932
  request: startRequest,
13522
13933
  playName,
@@ -13529,7 +13940,13 @@ async function handleNamedRun(options, hooks) {
13529
13940
  progress,
13530
13941
  onRunStarted: hooks?.onRunStarted,
13531
13942
  onSubmission: hooks?.onSubmission,
13532
- onRunAdmitted: hooks?.onRunAdmitted
13943
+ onRunAdmitted: hooks?.onRunAdmitted,
13944
+ maintenancePolicy: options.maintenancePolicy,
13945
+ ...options.runIdFile ? {} : { fullJson: options.fullJson },
13946
+ ...cliAdmission ? {
13947
+ cliAdmission: true,
13948
+ streamTerminalWindowMs: PLAY_START_STREAM_TERMINAL_WINDOW_MS
13949
+ } : {}
13533
13950
  }).catch(async (error) => {
13534
13951
  throw await normalizePlayStartError(client, error, playName, {
13535
13952
  suggestMissingPlay: true
@@ -13543,12 +13960,12 @@ async function handleNamedRun(options, hooks) {
13543
13960
  }
13544
13961
  const outputStatus = withOrdinaryRunAgainCommand(
13545
13962
  withTerminalPlayIdentity(
13546
- await resolvePlayRunOutputStatus({
13963
+ options.runIdFile ? await resolvePlayRunOutputStatus({
13547
13964
  client,
13548
13965
  status: finalStatus,
13549
13966
  fullJson: options.fullJson,
13550
13967
  jsonOutput: options.jsonOutput
13551
- }),
13968
+ }) : finalStatus,
13552
13969
  playName
13553
13970
  ),
13554
13971
  options,
@@ -14299,7 +14716,7 @@ Active runs: ${next.running}`
14299
14716
  return lines2.join("\n");
14300
14717
  });
14301
14718
  const nextOffset = (page.offset ?? offset ?? 0) + runs.length;
14302
- const nextPage = page.hasMore && playName ? `deepline runs list --play ${shellQuote(playName)}${statusFilter ? ` --status ${shellQuote(statusFilter)}` : ""} --limit ${page.limit ?? limit ?? 20} --offset ${nextOffset}` : null;
14719
+ const nextPage = page.hasMore && playName ? `deepline runs list --play ${shellQuote(playName)}${nodeId ? ` --node ${shellQuote(nodeId)}` : ""}${statusFilter ? ` --status ${shellQuote(statusFilter)}` : ""} --limit ${page.limit ?? limit ?? 20} --offset ${nextOffset}${argsWantJson(args) ? " --json" : ""}` : null;
14303
14720
  if (page.hasMore) {
14304
14721
  lines.push("List truncated \u2014 more runs match this filter.");
14305
14722
  lines.push(
@@ -15083,6 +15500,7 @@ async function handleRunExport(args) {
15083
15500
  }
15084
15501
  const client = new DeeplineClient();
15085
15502
  let status = await client.getPlayStatus(runId, { full: true });
15503
+ assertRunExportStatusIdentity(status, runId);
15086
15504
  if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
15087
15505
  const progress = createCliProgress(!argsWantJson(args));
15088
15506
  try {
@@ -15103,6 +15521,7 @@ async function handleRunExport(args) {
15103
15521
  progress
15104
15522
  });
15105
15523
  status = await client.getPlayStatus(runId, { full: true });
15524
+ assertRunExportStatusIdentity(status, runId);
15106
15525
  progress.complete();
15107
15526
  } catch (error) {
15108
15527
  progress.fail();
@@ -15198,6 +15617,19 @@ async function handleRunExport(args) {
15198
15617
  });
15199
15618
  return 0;
15200
15619
  }
15620
+ function assertRunExportStatusIdentity(status, requestedRunId) {
15621
+ if (status.runId === requestedRunId) return;
15622
+ throw new DeeplineError(
15623
+ `Run status identity did not match requested run ${requestedRunId}; refusing to export rows for ${status.runId || "an unidentified run"}.`,
15624
+ void 0,
15625
+ "RUN_EXPORT_SCOPE_MISMATCH",
15626
+ {
15627
+ requestedRunId,
15628
+ statusRunId: status.runId || null,
15629
+ reason: "status_identity_mismatch"
15630
+ }
15631
+ );
15632
+ }
15201
15633
  async function handlePlayGet(args) {
15202
15634
  const target = args[0];
15203
15635
  if (!target) {
@@ -16555,7 +16987,8 @@ JSON field selection:
16555
16987
  resolvePlayRunCliOptions(
16556
16988
  effectiveTarget ?? void 0,
16557
16989
  options,
16558
- passthroughArgs
16990
+ passthroughArgs,
16991
+ resolveCliMaintenancePolicy(command.optsWithGlobals())
16559
16992
  )
16560
16993
  );
16561
16994
  recordCliTrace({
@@ -16762,7 +17195,7 @@ Examples:
16762
17195
  process.exitCode = await ownView();
16763
17196
  return;
16764
17197
  }
16765
- const { describeAnything } = await import("./describe-XYJ2ZT4M.mjs");
17198
+ const { describeAnything } = await import("./describe-U4KOGDRA.mjs");
16766
17199
  process.exitCode = await describeAnything(
16767
17200
  name,
16768
17201
  {
@@ -17151,12 +17584,13 @@ Examples:
17151
17584
  deepline runs list --play my-play --status failed --compact
17152
17585
  deepline runs list --status running --compact
17153
17586
  `
17154
- ).option("--play <name>", "Play name to filter runs").option("--status <status>", "Filter by run status").option("--limit <count>", "Maximum runs to return").option("--offset <count>", "Zero-based page offset (requires --play)").option("--compact", "Drop verbose fields from JSON output").option("--json", "Emit JSON output").option(
17587
+ ).option("--play <name>", "Play name to filter runs").option("--node <id>", "Mermaid node id to filter runs").option("--status <status>", "Filter by run status").option("--limit <count>", "Maximum runs to return").option("--offset <count>", "Zero-based page offset (requires --play)").option("--compact", "Drop verbose fields from JSON output").option("--json", "Emit JSON output").option(
17155
17588
  "--timing",
17156
17589
  "Report the inventory request duration and periodic long-read updates to stderr"
17157
17590
  ).action(async (options) => {
17158
17591
  process.exitCode = await handleRunsList([
17159
17592
  ...options.play ? ["--play", options.play] : [],
17593
+ ...options.node ? ["--node", options.node] : [],
17160
17594
  ...options.status ? ["--status", options.status] : [],
17161
17595
  ...options.limit ? ["--limit", options.limit] : [],
17162
17596
  ...options.offset ? ["--offset", options.offset] : [],
@@ -17812,6 +18246,7 @@ export {
17812
18246
  resolveRunStopState,
17813
18247
  selectRunLogTailPage,
17814
18248
  shouldPrintPlayProgressLine,
18249
+ startAndWaitForPlayCompletion,
17815
18250
  startAndWaitForPlayCompletionByStream,
17816
18251
  truncateErrorForDisplay,
17817
18252
  waitForPlayCompletionByWatch,