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
@@ -8,7 +8,7 @@ var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
8
8
  var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
9
9
 
10
10
 
11
- var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
11
+ var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
12
12
 
13
13
  // ../play-runtime/run-lifecycle-policy.ts
14
14
  var TERMINAL_PLAY_RUN_STATUSES = /* @__PURE__ */ new Set([
@@ -73,9 +73,21 @@ function decodePlayRunPublicStatus(value) {
73
73
 
74
74
  // src/plays/run-request.ts
75
75
  var PLAY_RUN_START_PATH = "/api/v2/plays/run";
76
+ var CLI_PLAY_RUN_START_PATH = `${PLAY_RUN_START_PATH}/cli`;
77
+ var CLI_PLAY_RUN_SUPPORTED_HEADER = "x-deepline-cli-play-admission";
76
78
  var PLAY_RUN_START_STREAM_PATH = `${PLAY_RUN_START_PATH}?stream=true`;
79
+ var CLI_PLAY_RUN_START_STREAM_PATH = `${CLI_PLAY_RUN_START_PATH}?stream=true`;
77
80
  var PLAY_FILES_STAGE_PATH = "/api/v2/plays/files/stage";
78
81
  var PLAY_FILES_STAGE_MINT_PATH = `${PLAY_FILES_STAGE_PATH}/mint`;
82
+ var CliPlayAdmissionUnsupportedError = class extends _chunkPPDBRJRWjs.DeeplineError {
83
+ constructor(status) {
84
+ super(
85
+ "This server does not support CLI Play admission.",
86
+ status,
87
+ "CLI_PLAY_ADMISSION_UNSUPPORTED"
88
+ );
89
+ }
90
+ };
79
91
  function buildPlayRunStartBody(request) {
80
92
  return {
81
93
  ...request.admissionOrgId ? { admissionOrgId: request.admissionOrgId } : {},
@@ -103,6 +115,7 @@ function buildPlayRunStartBody(request) {
103
115
  ...typeof request.maxConcurrentRows === "number" ? { maxConcurrentRows: request.maxConcurrentRows } : {},
104
116
  ...typeof request.maxCredits === "number" ? { maxCredits: request.maxCredits } : {},
105
117
  ...typeof request.waitForCompletionMs === "number" ? { waitForCompletionMs: request.waitForCompletionMs } : {},
118
+ ...request.terminalStatus === "full" ? { terminalStatus: "full" } : {},
106
119
  // Profile selection is the API's job, not the caller's. The server
107
120
  // defaults to absurd; callers normally omit this field.
108
121
  ...request.profile ? { profile: request.profile } : {},
@@ -112,19 +125,19 @@ function buildPlayRunStartBody(request) {
112
125
  ...request.testPolicyOverrides ? { testPolicyOverrides: request.testPolicyOverrides } : {}
113
126
  };
114
127
  }
115
- async function preparePlayRunAdmission(http, request, onSubmission) {
128
+ async function preparePlayRunAdmission(http, request, onSubmission, options) {
116
129
  let capability = null;
117
130
  if (http.get) {
118
131
  try {
119
- capability = await http.get(PLAY_RUN_START_PATH);
132
+ capability = await http.get(PLAY_RUN_START_PATH, options);
120
133
  } catch (error) {
121
- if (!(error instanceof _chunk7P5AA3SNjs.DeeplineError) || ![404, 405].includes(_nullishCoalesce(error.statusCode, () => ( 0))))
134
+ if (!(error instanceof _chunkPPDBRJRWjs.DeeplineError) || ![404, 405].includes(_nullishCoalesce(error.statusCode, () => ( 0))))
122
135
  throw error;
123
136
  }
124
137
  if (capability && !["caller-intent-v1", "unsupported"].includes(
125
138
  _nullishCoalesce(capability.admissionContract, () => ( ""))
126
139
  )) {
127
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
140
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
128
141
  "The server admission capability response is unknown; execution was not submitted.",
129
142
  503,
130
143
  "PLAY_RUN_ADMISSION_CAPABILITY_UNKNOWN"
@@ -132,22 +145,37 @@ async function preparePlayRunAdmission(http, request, onSubmission) {
132
145
  }
133
146
  }
134
147
  const supportsCallerIntent = _optionalChain([capability, 'optionalAccess', _5 => _5.admissionContract]) === "caller-intent-v1";
135
- if (supportsCallerIntent && (!_optionalChain([capability, 'optionalAccess', _6 => _6.orgId]) || request.admissionOrgId && request.admissionOrgId !== capability.orgId)) {
136
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
148
+ _optionalChain([options, 'optionalAccess', _6 => _6.signal, 'optionalAccess', _7 => _7.throwIfAborted, 'call', _8 => _8()]);
149
+ if (supportsCallerIntent && (!_optionalChain([capability, 'optionalAccess', _9 => _9.orgId]) || request.admissionOrgId && request.admissionOrgId !== capability.orgId)) {
150
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
137
151
  "The admission workspace could not be pinned to this request; execution was not submitted.",
138
152
  409,
139
153
  "PLAY_RUN_ADMISSION_TENANT_CONFLICT"
140
154
  );
141
155
  }
142
156
  if (request.workflowId && !supportsCallerIntent) {
143
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
157
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
144
158
  "This server has not enabled caller-owned admission recovery. Do not retry an ambiguous start.",
145
159
  409,
146
160
  "PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
147
161
  );
148
162
  }
149
- if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _7 => _7.strictTotalBudget]) !== "fail-closed-v1") {
150
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
163
+ if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _10 => _10.strictTotalBudget]) === "unbounded-v1") {
164
+ if (request.maxTotalCredits === 0) {
165
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
166
+ "A zero-credit total budget cannot admit a Play: sandbox compute is billed even when provider tools are free.",
167
+ 422,
168
+ "PLAY_TOTAL_BUDGET_COMPUTE_REQUIRED"
169
+ );
170
+ }
171
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
172
+ "A strict total Play budget cannot currently be admitted: provider operations, Customer DB compute, and additional sandbox sessions do not have a finite admitted upper bound.",
173
+ 422,
174
+ "PLAY_TOTAL_BUDGET_UNBOUNDED"
175
+ );
176
+ }
177
+ if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _11 => _11.strictTotalBudget]) !== "fail-closed-v1") {
178
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
151
179
  "This server cannot honor a strict total Play budget. Execution was not submitted.",
152
180
  409,
153
181
  "PLAY_TOTAL_BUDGET_UNSUPPORTED"
@@ -164,15 +192,15 @@ async function preparePlayRunAdmission(http, request, onSubmission) {
164
192
  const workflowId = supportsCallerIntent ? _nullishCoalesce(request.workflowId, () => ( _chunkXDVT3GOMjs.buildCallerPlayWorkflowId.call(void 0, _nullishCoalesce(request.name, () => ( "play")), wireBody))) : void 0;
165
193
  const submittedBody = workflowId ? { workflowId, ...wireBody } : wireBody;
166
194
  if (workflowId && !_chunkXDVT3GOMjs.callerPlayWorkflowIdMatchesRequest.call(void 0, workflowId, submittedBody)) {
167
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
195
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
168
196
  "workflowId must be the caller run ID of this same immutable request.",
169
197
  400,
170
198
  "PLAY_RUN_START_INTENT_CONFLICT"
171
199
  );
172
200
  }
173
201
  if (onSubmission) {
174
- if (!workflowId || !_optionalChain([capability, 'optionalAccess', _8 => _8.orgId])) {
175
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
202
+ if (!workflowId || !_optionalChain([capability, 'optionalAccess', _12 => _12.orgId])) {
203
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
176
204
  "This server cannot persist a recoverable submission intent. Execution was not submitted.",
177
205
  409,
178
206
  "PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
@@ -186,29 +214,47 @@ async function preparePlayRunAdmission(http, request, onSubmission) {
186
214
  }
187
215
  return { body: submittedBody, workflowId, supportsCallerIntent };
188
216
  }
189
- async function startPlayRun(http, request, headers, onSubmission) {
217
+ async function startPlayRun(http, request, headers, options) {
190
218
  const {
191
219
  body: submittedBody,
192
220
  workflowId,
193
221
  supportsCallerIntent
194
- } = await preparePlayRunAdmission(http, request, onSubmission);
222
+ } = await preparePlayRunAdmission(
223
+ http,
224
+ request,
225
+ _optionalChain([options, 'optionalAccess', _13 => _13.onSubmission]),
226
+ options
227
+ );
228
+ let cliAdmissionSupported = false;
195
229
  let response;
196
230
  try {
197
231
  response = await http.post(
198
- PLAY_RUN_START_PATH,
232
+ _optionalChain([options, 'optionalAccess', _14 => _14.cliAdmission]) ? CLI_PLAY_RUN_START_PATH : PLAY_RUN_START_PATH,
199
233
  submittedBody,
200
234
  headers,
201
- { maxRetries: 0, exactUrlOnly: true }
235
+ {
236
+ maxRetries: 0,
237
+ exactUrlOnly: true,
238
+ ..._optionalChain([options, 'optionalAccess', _15 => _15.signal]) ? { signal: options.signal } : {},
239
+ ..._optionalChain([options, 'optionalAccess', _16 => _16.cliAdmission]) ? {
240
+ onResponse: (response2) => {
241
+ cliAdmissionSupported = response2.headers.get(CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
242
+ }
243
+ } : {}
244
+ }
202
245
  );
203
246
  } catch (error) {
204
- if (error instanceof _chunk7P5AA3SNjs.DeeplineError && ["NETWORK_TIMEOUT", "NETWORK_ERROR", "FETCH_FAILED"].includes(
247
+ if (_optionalChain([options, 'optionalAccess', _17 => _17.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkPPDBRJRWjs.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
248
+ throw new CliPlayAdmissionUnsupportedError(error.statusCode);
249
+ }
250
+ if (error instanceof _chunkPPDBRJRWjs.DeeplineError && ["NETWORK_TIMEOUT", "NETWORK_ERROR", "FETCH_FAILED"].includes(
205
251
  _nullishCoalesce(error.code, () => ( ""))
206
252
  ) || error instanceof TypeError || error instanceof Error && ["AbortError", "TimeoutError"].includes(error.name)) {
207
253
  const originalMessage = error instanceof Error ? error.message : "Transport failed";
208
- const failure = new (0, _chunk7P5AA3SNjs.DeeplineError)(
254
+ const failure = new (0, _chunkPPDBRJRWjs.DeeplineError)(
209
255
  workflowId ? `${originalMessage} Admission outcome is unknown for ${workflowId}. Inspect this run before retrying; reuse this workflowId for the same immutable request.` : `${originalMessage} Admission outcome is unknown. This server did not prove caller-owned recovery support; inspect existing runs before starting again.`,
210
- error instanceof _chunk7P5AA3SNjs.DeeplineError ? error.statusCode : void 0,
211
- error instanceof _chunk7P5AA3SNjs.DeeplineError ? error.code : "NETWORK_ERROR",
256
+ error instanceof _chunkPPDBRJRWjs.DeeplineError ? error.statusCode : void 0,
257
+ error instanceof _chunkPPDBRJRWjs.DeeplineError ? error.code : "NETWORK_ERROR",
212
258
  {
213
259
  ...workflowId ? { runId: workflowId, workflowId } : {},
214
260
  admissionState: "unknown",
@@ -223,11 +269,19 @@ async function startPlayRun(http, request, headers, onSubmission) {
223
269
  }
224
270
  throw error;
225
271
  }
226
- return normalizePlayRunStart(response);
272
+ const started = normalizePlayRunStart(response);
273
+ if (_optionalChain([options, 'optionalAccess', _18 => _18.cliAdmission]) && (!started.workflowId || started.workflowId === "pending")) {
274
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
275
+ "Play admission returned no run id. Check recent runs before submitting again.",
276
+ void 0,
277
+ "PLAY_START_MISSING_RUN_ID"
278
+ );
279
+ }
280
+ return started;
227
281
  }
228
282
  function isPlayRunPackage(value) {
229
283
  return Boolean(
230
- value && typeof value === "object" && !Array.isArray(value) && value.kind === "play_run" && value.run && typeof _optionalChain([value, 'access', _9 => _9.run, 'optionalAccess', _10 => _10.id]) === "string"
284
+ value && typeof value === "object" && !Array.isArray(value) && value.kind === "play_run" && value.run && typeof _optionalChain([value, 'access', _19 => _19.run, 'optionalAccess', _20 => _20.id]) === "string"
231
285
  );
232
286
  }
233
287
  function normalizePlayRunStart(raw) {
@@ -245,7 +299,7 @@ function normalizePlayRunStart(raw) {
245
299
  name: runPackage.run.playName,
246
300
  status,
247
301
  ...runPackage.run.dashboardUrl ? { dashboardUrl: runPackage.run.dashboardUrl } : {},
248
- ...isTerminalPlayRunLifecycleStatus(status) ? { finalStatus: runPackage } : {},
302
+ ...isTerminalPlayRunLifecycleStatus(status) ? raw.finalStatusView === "full" && raw.runId === runPackage.run.id ? { finalStatus: raw, finalStatusView: "full" } : { finalStatus: runPackage } : {},
249
303
  package: runPackage
250
304
  };
251
305
  }
@@ -267,7 +321,7 @@ function schemaMetadata(schema, key) {
267
321
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
268
322
  }
269
323
  function stringMetadata(metadata, key) {
270
- const value = _optionalChain([metadata, 'optionalAccess', _11 => _11[key]]);
324
+ const value = _optionalChain([metadata, 'optionalAccess', _21 => _21[key]]);
271
325
  return typeof value === "string" && value.trim() ? value.trim() : null;
272
326
  }
273
327
  function inputFieldFromCsvArg(csvArg) {
@@ -275,7 +329,7 @@ function inputFieldFromCsvArg(csvArg) {
275
329
  const match = /^\(?\s*input\.([A-Za-z_$][\w$]*)\s*\)?(?:\s*\?\?[\s\S]+)?$/.exec(
276
330
  csvArg.trim()
277
331
  );
278
- return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _12 => _12[1]]), () => ( null));
332
+ return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _22 => _22[1]]), () => ( null));
279
333
  }
280
334
  function fileInputBindingsFromPlaySchema(inputSchema) {
281
335
  const csvInput = schemaMetadata(inputSchema, "csvInput");
@@ -373,10 +427,10 @@ function stagedUploadIdentity(logicalPath, contentHash) {
373
427
  return `${contentHash}:${logicalPath}`;
374
428
  }
375
429
  function isStagedUploadMintUnsupported(error) {
376
- return error instanceof _chunk7P5AA3SNjs.DeeplineError && error.statusCode === 404;
430
+ return error instanceof _chunkPPDBRJRWjs.DeeplineError && error.statusCode === 404;
377
431
  }
378
432
  function isStagedUploadDirectEgressDenied(error) {
379
- return error instanceof _chunk7P5AA3SNjs.DeeplineError && error.code === "STAGED_FILE_UPLOAD_EGRESS_DENIED";
433
+ return error instanceof _chunkPPDBRJRWjs.DeeplineError && error.code === "STAGED_FILE_UPLOAD_EGRESS_DENIED";
380
434
  }
381
435
  function formatMegabytes(bytes) {
382
436
  return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
@@ -406,8 +460,8 @@ async function uploadStagedFileToPresignedUrl(input) {
406
460
  return;
407
461
  }
408
462
  const text = await response.text().catch(() => "");
409
- const egressDenied = response.status === 403 && _optionalChain([response, 'access', _13 => _13.headers, 'access', _14 => _14.get, 'call', _15 => _15("x-deny-reason"), 'optionalAccess', _16 => _16.trim, 'call', _17 => _17(), 'access', _18 => _18.toLowerCase, 'call', _19 => _19()]) === "host_not_allowed";
410
- lastError = new (0, _chunk7P5AA3SNjs.DeeplineError)(
463
+ const egressDenied = response.status === 403 && _optionalChain([response, 'access', _23 => _23.headers, 'access', _24 => _24.get, 'call', _25 => _25("x-deny-reason"), 'optionalAccess', _26 => _26.trim, 'call', _27 => _27(), 'access', _28 => _28.toLowerCase, 'call', _29 => _29()]) === "host_not_allowed";
464
+ lastError = new (0, _chunkPPDBRJRWjs.DeeplineError)(
411
465
  `Direct storage upload of ${input.logicalPath} failed: ${response.status} ${text.slice(0, 200)}`,
412
466
  response.status,
413
467
  egressDenied ? "STAGED_FILE_UPLOAD_EGRESS_DENIED" : "STAGED_FILE_UPLOAD_FAILED",
@@ -417,7 +471,7 @@ async function uploadStagedFileToPresignedUrl(input) {
417
471
  break;
418
472
  }
419
473
  } catch (error) {
420
- lastError = error instanceof TypeError ? new (0, _chunk7P5AA3SNjs.DeeplineError)(
474
+ lastError = error instanceof TypeError ? new (0, _chunkPPDBRJRWjs.DeeplineError)(
421
475
  `Direct storage upload of ${input.logicalPath} could not reach the storage endpoint: ${error.message}`,
422
476
  void 0,
423
477
  "STAGED_FILE_UPLOAD_EGRESS_DENIED",
@@ -428,7 +482,7 @@ async function uploadStagedFileToPresignedUrl(input) {
428
482
  await sleep(250 * attempt);
429
483
  }
430
484
  }
431
- throw lastError instanceof Error ? lastError : new (0, _chunk7P5AA3SNjs.DeeplineError)(
485
+ throw lastError instanceof Error ? lastError : new (0, _chunkPPDBRJRWjs.DeeplineError)(
432
486
  `Direct storage upload of ${input.logicalPath} failed.`,
433
487
  void 0,
434
488
  "STAGED_FILE_UPLOAD_FAILED",
@@ -443,7 +497,7 @@ async function stagePlayFilesViaMultipart(http, files, reason = "mint-unsupporte
443
497
  for (const file of files) {
444
498
  if (file.bytes > STAGE_LEGACY_MULTIPART_MAX_BYTES) {
445
499
  const reasonMessage = reason === "direct-egress-denied" ? "direct storage is blocked by this environment's network egress policy" : "the connected Deepline server does not support direct-to-storage uploads";
446
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
500
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
447
501
  `Cannot stage ${file.logicalPath} (${formatMegabytes(file.bytes)}): ${reasonMessage}, and this file exceeds the ~4.5MB request-body limit the legacy upload path is subject to.`,
448
502
  413,
449
503
  "STAGED_FILE_TOO_LARGE_FOR_LEGACY_UPLOAD",
@@ -517,7 +571,7 @@ async function stagePlayFiles(http, files) {
517
571
  stagedUploadIdentity(file.logicalPath, file.contentHash)
518
572
  );
519
573
  if (!upload) {
520
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
574
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
521
575
  `The staging server did not return an upload target for ${file.logicalPath}.`,
522
576
  void 0,
523
577
  "STAGED_FILE_MINT_INCOMPLETE"
@@ -553,7 +607,7 @@ async function stagePlayFiles(http, files) {
553
607
  "direct-egress-denied"
554
608
  );
555
609
  if (!ref) {
556
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
610
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
557
611
  `The staging server did not return an upload target for ${result.fallbackFile.logicalPath}.`,
558
612
  void 0,
559
613
  "STAGED_FILE_MINT_INCOMPLETE"
@@ -581,7 +635,7 @@ async function stageFileInputs(input) {
581
635
  if (localFiles.length === 0) {
582
636
  return { inputFile: null, packagedFiles: [] };
583
637
  }
584
- _optionalChain([input, 'access', _20 => _20.onStaging, 'optionalCall', _21 => _21(localFiles.length)]);
638
+ _optionalChain([input, 'access', _30 => _30.onStaging, 'optionalCall', _31 => _31(localFiles.length)]);
585
639
  const uploads = await Promise.all(
586
640
  localFiles.map(
587
641
  async ({ file }) => createStagedFileUpload(file.logicalPath, await file.read(), input.codec)
@@ -621,7 +675,7 @@ function createSessionPlayRunHttp(fetchImpl = (...args) => fetch(...args)) {
621
675
  } catch (e) {
622
676
  }
623
677
  if (!response.ok) {
624
- throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
678
+ throw new (0, _chunkPPDBRJRWjs.DeeplineError)(
625
679
  _chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
626
680
  response.status,
627
681
  _chunkXNYIZMNQjs.apiErrorCodeFromResponse.call(void 0, parsed),
@@ -631,11 +685,12 @@ function createSessionPlayRunHttp(fetchImpl = (...args) => fetch(...args)) {
631
685
  return parsed;
632
686
  };
633
687
  return {
634
- get: (path) => send(path, { method: "GET" }),
635
- post: (path, body, headers) => send(path, {
688
+ get: (path, options) => send(path, { method: "GET", ...options }),
689
+ post: (path, body, headers, options) => send(path, {
636
690
  method: "POST",
637
691
  headers: { "content-type": "application/json", ...headers },
638
- body: JSON.stringify(body)
692
+ body: JSON.stringify(body),
693
+ ..._optionalChain([options, 'optionalAccess', _32 => _32.signal]) ? { signal: options.signal } : {}
639
694
  }),
640
695
  postFormData: (path, formData) => send(path, {
641
696
  method: "POST",
@@ -671,4 +726,8 @@ function createSessionPlayRunHttp(fetchImpl = (...args) => fetch(...args)) {
671
726
 
672
727
 
673
728
 
674
- exports.isTerminalPlayRunLifecycleStatus = isTerminalPlayRunLifecycleStatus; exports.decodePlayRunPublicStatus = decodePlayRunPublicStatus; exports.PLAY_RUN_START_PATH = PLAY_RUN_START_PATH; exports.PLAY_RUN_START_STREAM_PATH = PLAY_RUN_START_STREAM_PATH; exports.PLAY_FILES_STAGE_PATH = PLAY_FILES_STAGE_PATH; exports.PLAY_FILES_STAGE_MINT_PATH = PLAY_FILES_STAGE_MINT_PATH; exports.buildPlayRunStartBody = buildPlayRunStartBody; exports.preparePlayRunAdmission = preparePlayRunAdmission; exports.startPlayRun = startPlayRun; exports.isPlayRunPackage = isPlayRunPackage; exports.normalizePlayRunStart = normalizePlayRunStart; exports.buildNamedPlayRunRequest = buildNamedPlayRunRequest; exports.CSV_DATA_INPUT_KEY = CSV_DATA_INPUT_KEY; exports.fileInputBindingsFromPlaySchema = fileInputBindingsFromPlaySchema; exports.fileInputBindingsFromStaticPipeline = fileInputBindingsFromStaticPipeline; exports.playRunFileInputBindings = playRunFileInputBindings; exports.getDottedInputValue = getDottedInputValue; exports.setDottedInputValue = setDottedInputValue; exports.webStagedFileCodec = webStagedFileCodec; exports.stagedFileContentType = stagedFileContentType; exports.createStagedFileUpload = createStagedFileUpload; exports.STAGE_LEGACY_MULTIPART_MAX_BYTES = STAGE_LEGACY_MULTIPART_MAX_BYTES; exports.mintStagedPlayFileUploads = mintStagedPlayFileUploads; exports.stagePlayFiles = stagePlayFiles; exports.stageFileInputs = stageFileInputs; exports.createSessionPlayRunHttp = createSessionPlayRunHttp;
729
+
730
+
731
+
732
+
733
+ exports.isTerminalPlayRunLifecycleStatus = isTerminalPlayRunLifecycleStatus; exports.decodePlayRunPublicStatus = decodePlayRunPublicStatus; exports.PLAY_RUN_START_PATH = PLAY_RUN_START_PATH; exports.CLI_PLAY_RUN_START_PATH = CLI_PLAY_RUN_START_PATH; exports.CLI_PLAY_RUN_SUPPORTED_HEADER = CLI_PLAY_RUN_SUPPORTED_HEADER; exports.PLAY_RUN_START_STREAM_PATH = PLAY_RUN_START_STREAM_PATH; exports.CLI_PLAY_RUN_START_STREAM_PATH = CLI_PLAY_RUN_START_STREAM_PATH; exports.PLAY_FILES_STAGE_PATH = PLAY_FILES_STAGE_PATH; exports.PLAY_FILES_STAGE_MINT_PATH = PLAY_FILES_STAGE_MINT_PATH; exports.CliPlayAdmissionUnsupportedError = CliPlayAdmissionUnsupportedError; exports.buildPlayRunStartBody = buildPlayRunStartBody; exports.preparePlayRunAdmission = preparePlayRunAdmission; exports.startPlayRun = startPlayRun; exports.isPlayRunPackage = isPlayRunPackage; exports.normalizePlayRunStart = normalizePlayRunStart; exports.buildNamedPlayRunRequest = buildNamedPlayRunRequest; exports.CSV_DATA_INPUT_KEY = CSV_DATA_INPUT_KEY; exports.fileInputBindingsFromPlaySchema = fileInputBindingsFromPlaySchema; exports.fileInputBindingsFromStaticPipeline = fileInputBindingsFromStaticPipeline; exports.playRunFileInputBindings = playRunFileInputBindings; exports.getDottedInputValue = getDottedInputValue; exports.setDottedInputValue = setDottedInputValue; exports.webStagedFileCodec = webStagedFileCodec; exports.stagedFileContentType = stagedFileContentType; exports.createStagedFileUpload = createStagedFileUpload; exports.STAGE_LEGACY_MULTIPART_MAX_BYTES = STAGE_LEGACY_MULTIPART_MAX_BYTES; exports.mintStagedPlayFileUploads = mintStagedPlayFileUploads; exports.stagePlayFiles = stagePlayFiles; exports.stageFileInputs = stageFileInputs; exports.createSessionPlayRunHttp = createSessionPlayRunHttp;
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkWLOCMJWVjs = require('./chunk-WLOCMJWV.js');
3
+ var _chunkTPFD4F5Sjs = require('./chunk-TPFD4F5S.js');
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  var _child_process = require('child_process');
@@ -13,7 +13,7 @@ function npmSupportsAllowScripts(version) {
13
13
  }
14
14
  function readNpmVersion(env) {
15
15
  try {
16
- const plan = _chunkWLOCMJWVjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
16
+ const plan = _chunkTPFD4F5Sjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
17
17
  const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
18
18
  encoding: "utf8",
19
19
  env,
@@ -1,6 +1,18 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkYD7B53RWjs = require('./chunk-YD7B53RW.js');
3
+ var _chunkZHWBU36Hjs = require('./chunk-ZHWBU36H.js');
4
+
5
+ // src/cli/maintenance-policy.ts
6
+ var _commander = require('commander');
7
+ function parseCliMaintenancePolicy(value) {
8
+ if (value === "configured" || value === "off") return value;
9
+ throw new (0, _commander.InvalidArgumentError)(
10
+ "Maintenance policy must be configured or off."
11
+ );
12
+ }
13
+ function resolveCliMaintenancePolicy(input) {
14
+ return input.dryRun ? "off" : _nullishCoalesce(input.maintenance, () => ( "configured"));
15
+ }
4
16
 
5
17
  // src/cli/trace.ts
6
18
  var cliTraceStartedAt = Date.now();
@@ -21,7 +33,7 @@ function recordCliTrace(event) {
21
33
  sinceStartMs: now - cliTraceStartedAt,
22
34
  ...event
23
35
  };
24
- _chunkYD7B53RWjs.writeRawStderr.call(void 0, `[cli-trace] ${JSON.stringify(payload)}
36
+ _chunkZHWBU36Hjs.writeRawStderr.call(void 0, `[cli-trace] ${JSON.stringify(payload)}
25
37
  `);
26
38
  }
27
39
  async function traceCliSpan(phase, fields, run) {
@@ -53,4 +65,7 @@ async function traceCliSpan(phase, fields, run) {
53
65
 
54
66
 
55
67
 
56
- exports.recordCliTrace = recordCliTrace; exports.traceCliSpan = traceCliSpan;
68
+
69
+
70
+
71
+ exports.parseCliMaintenancePolicy = parseCliMaintenancePolicy; exports.resolveCliMaintenancePolicy = resolveCliMaintenancePolicy; exports.isCliTraceEnabled = isCliTraceEnabled; exports.recordCliTrace = recordCliTrace; exports.traceCliSpan = traceCliSpan;
@@ -2,7 +2,7 @@ import {
2
2
  argsWantJson,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-JRAVVJ3T.mjs";
5
+ } from "./chunk-XJD6LZCO.mjs";
6
6
  import {
7
7
  ACTIVE_ORG_ID_ENV,
8
8
  ACTIVE_ORG_NAME_ENV,
@@ -25,7 +25,7 @@ import {
25
25
  saveHostEnvValues,
26
26
  saveProjectDeeplineEnvValues,
27
27
  storedHostApiKey
28
- } from "./chunk-2PRO2JTX.mjs";
28
+ } from "./chunk-E52TKKVI.mjs";
29
29
 
30
30
  // src/cli/commands/auth.ts
31
31
  import {