deepline 0.3.483 → 0.3.485

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 (217) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +91 -30
  2. package/dist/bundling-sources/sdk/src/compat.ts +13 -0
  3. package/dist/bundling-sources/sdk/src/plays/client-core.ts +4 -1
  4. package/dist/bundling-sources/sdk/src/plays/run-request.ts +143 -9
  5. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +31 -4
  7. package/dist/bundling-sources/sdk/src/tool-calls.ts +1 -1
  8. package/dist/bundling-sources/sdk/src/types.ts +7 -1
  9. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +100 -9
  10. package/dist/bundling-sources/shared_libs/play-data-plane/sheet-column-storage.ts +32 -3
  11. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +126 -41
  12. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +231 -25
  13. package/dist/bundling-sources/shared_libs/play-runtime/daytona-runtime-config.ts +9 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +130 -19
  15. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +105 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +4 -2
  17. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +194 -56
  18. package/dist/bundling-sources/shared_libs/play-runtime/log-provenance.ts +11 -6
  19. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +3 -0
  20. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/ports.ts +2 -0
  21. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/postgres-adapter.ts +2 -1
  22. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +30 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +195 -2
  24. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +20 -1
  25. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +15 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +2 -2
  27. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +102 -23
  28. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/progress-sidecar.ts +9 -1
  29. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-control-transport.ts +25 -5
  30. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +133 -82
  31. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +58 -16
  32. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-sandbox-absence.ts +171 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +69 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +100 -40
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +8 -0
  36. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +67 -9
  37. package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +5 -5
  38. package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +6 -3
  39. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-errors.ts +14 -0
  40. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-writer.ts +87 -31
  41. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +18 -0
  42. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/index.ts +19 -0
  43. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +14 -0
  44. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +204 -6
  45. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +39 -0
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/ambiguous-modal-create-state.ts +21 -0
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/compute-billing-job-state.ts +23 -0
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-retirement-state.ts +25 -0
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-retirement.ts +15 -1
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/outbox-repair-operation-state.ts +30 -0
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +12 -1
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +26 -0
  53. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +44 -15
  54. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +60 -11
  55. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +743 -70
  56. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +6 -1
  57. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +17 -0
  58. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +34 -34
  59. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/sandbox-cleanup-job-state.ts +23 -0
  60. package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +12 -0
  61. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +21 -0
  62. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -1
  63. package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +1 -1
  64. package/dist/bundling-sources/shared_libs/product-notifications/destination-state.ts +93 -0
  65. package/dist/cli/auth-ABZBH55L.js +43 -0
  66. package/dist/cli/{auth-2NXF6Q3Q.mjs → auth-OWMUENCU.mjs} +5 -5
  67. package/dist/cli/{billing-5PW4L5WD.js → billing-2FMNQGOX.js} +80 -80
  68. package/dist/cli/{billing-W2Y4EOZP.mjs → billing-JX4H3VFF.mjs} +7 -7
  69. package/dist/cli/{chunk-UGBZ6MCR.js → chunk-2ILND7XX.js} +2 -2
  70. package/dist/cli/{chunk-25IGCYJP.mjs → chunk-2ZEQ43B7.mjs} +3 -3
  71. package/dist/cli/{chunk-J7S3DJB4.mjs → chunk-3DBW6C7M.mjs} +13 -4
  72. package/dist/cli/{chunk-7APXZ3CX.mjs → chunk-3DYU3JQN.mjs} +2 -2
  73. package/dist/cli/{chunk-VFEW53L5.js → chunk-3OF7NSGR.js} +322 -294
  74. package/dist/cli/{chunk-UDF2CY4D.mjs → chunk-3Z24NKW7.mjs} +62 -34
  75. package/dist/cli/{chunk-62XGOB2D.js → chunk-5DCQWQCP.js} +26 -26
  76. package/dist/cli/{chunk-4X23YY2E.mjs → chunk-62PJ6PK7.mjs} +5 -5
  77. package/dist/cli/{chunk-YL64JIQ7.mjs → chunk-676NZ7K4.mjs} +1 -1
  78. package/dist/cli/{chunk-T5GZZJ7O.js → chunk-775AZTO7.js} +323 -247
  79. package/dist/cli/{chunk-C3LJSOQ6.mjs → chunk-ACTUAZYP.mjs} +5 -5
  80. package/dist/cli/{chunk-R2OR4RHV.js → chunk-AFADYKFE.js} +8 -8
  81. package/dist/cli/{chunk-GVAENVIG.js → chunk-AUQQVDAB.js} +110 -21
  82. package/dist/cli/{chunk-GONUMUBM.js → chunk-BSKPQB2P.js} +7 -7
  83. package/dist/cli/chunk-C6QWRSMQ.js +42 -0
  84. package/dist/cli/{chunk-AK7UKQ5R.js → chunk-CSBMKHTV.js} +5 -5
  85. package/dist/cli/{chunk-PRL7EKJZ.mjs → chunk-CW6TAQBF.mjs} +15 -4
  86. package/dist/cli/{chunk-75IIHFN6.js → chunk-DMNVM34J.js} +5 -4
  87. package/dist/cli/{chunk-IEV5UWPN.mjs → chunk-E73JXJA3.mjs} +1 -1
  88. package/dist/cli/{chunk-DS455RPF.js → chunk-EC2CVPN5.js} +3 -3
  89. package/dist/cli/{chunk-B7HQL77V.js → chunk-ECIXZNSW.js} +87 -76
  90. package/dist/cli/{chunk-JJSLEMQQ.mjs → chunk-FJY6K3BG.mjs} +93 -17
  91. package/dist/cli/{chunk-FK47YUPC.mjs → chunk-G5PI3RNT.mjs} +1 -1
  92. package/dist/cli/{chunk-GRE3ID5E.mjs → chunk-GHHJWCMD.mjs} +2 -1
  93. package/dist/cli/{chunk-2JWG2H2N.js → chunk-HKGXGGIV.js} +1 -1
  94. package/dist/cli/{chunk-2MKX3HV3.js → chunk-IHMYIHF4.js} +5 -5
  95. package/dist/cli/{chunk-SD7QWZTV.mjs → chunk-INW22YP7.mjs} +1 -1
  96. package/dist/cli/{chunk-OWUZKXE7.mjs → chunk-J7EENGKJ.mjs} +1 -1
  97. package/dist/cli/{chunk-AWAFYRFV.mjs → chunk-JD6HKNKD.mjs} +1 -1
  98. package/dist/cli/{chunk-UY7OXFVU.js → chunk-JQXUWYWX.js} +13 -13
  99. package/dist/cli/{chunk-GGJQ4HJW.mjs → chunk-KZTNNLIL.mjs} +2 -2
  100. package/dist/cli/{chunk-NREZRYPU.mjs → chunk-L352NOE3.mjs} +2 -2
  101. package/dist/cli/{chunk-WI2HNYQX.js → chunk-L7IQ3DFH.js} +53 -53
  102. package/dist/cli/{chunk-4IOY2SCQ.js → chunk-LOX3BISD.js} +4 -4
  103. package/dist/cli/{chunk-XRIQN6EP.js → chunk-NKPTM7SK.js} +7 -7
  104. package/dist/cli/{chunk-5ICAG4RE.js → chunk-NLRTFJGH.js} +14 -14
  105. package/dist/cli/{chunk-WKB6Y43W.js → chunk-NRNWPWBW.js} +37 -37
  106. package/dist/cli/{chunk-HNRELVCS.mjs → chunk-ONONSV2Q.mjs} +96 -7
  107. package/dist/cli/{chunk-MYB6JVSD.js → chunk-OW4OTEFF.js} +16 -16
  108. package/dist/cli/{chunk-ISP7ZENV.mjs → chunk-RZE5I2XJ.mjs} +4 -4
  109. package/dist/cli/{chunk-5LHU7NUS.js → chunk-S3WQJ5VG.js} +3 -3
  110. package/dist/cli/{chunk-EDMCD7MX.mjs → chunk-SR6S4EYG.mjs} +5 -5
  111. package/dist/cli/{chunk-2T4OSJEH.js → chunk-T4G2T5DS.js} +21 -21
  112. package/dist/cli/{chunk-EGHYGTJM.mjs → chunk-TMCC7ORQ.mjs} +1 -1
  113. package/dist/cli/{chunk-SCPFOH5Z.mjs → chunk-TSCUWWTM.mjs} +1 -1
  114. package/dist/cli/{chunk-7TKLISLM.js → chunk-TVW6USSG.js} +3 -3
  115. package/dist/cli/{chunk-QSYA6VE4.js → chunk-U6WEGDD3.js} +2 -2
  116. package/dist/cli/{chunk-FGEC5SWP.mjs → chunk-UPHXGZCE.mjs} +4 -4
  117. package/dist/cli/{chunk-5JCXS4MP.js → chunk-UQ3LQ6IF.js} +5 -5
  118. package/dist/cli/{chunk-JYEZ6BWX.mjs → chunk-VZYTLWOM.mjs} +2 -2
  119. package/dist/cli/{chunk-FAZTLYJO.mjs → chunk-W33OL4F2.mjs} +2 -2
  120. package/dist/cli/{chunk-ZM2YPJQJ.js → chunk-XK5DMLZE.js} +5 -1
  121. package/dist/cli/{chunk-LJ5747UC.mjs → chunk-XRDXNAAY.mjs} +5 -1
  122. package/dist/cli/{chunk-S24CK3CJ.mjs → chunk-YDA3PMKK.mjs} +3 -3
  123. package/dist/cli/{csv-EKEFLUIW.js → csv-HFEQPGNY.js} +13 -13
  124. package/dist/cli/{csv-DIFVIR23.mjs → csv-OHF3Y5KB.mjs} +4 -4
  125. package/dist/cli/{db-DOW4EVEU.mjs → db-M456OUXD.mjs} +7 -7
  126. package/dist/cli/{db-S7DDRUHX.js → db-VLQKCYQS.js} +28 -28
  127. package/dist/cli/describe-CP35DZ5Z.js +49 -0
  128. package/dist/cli/{describe-KSZFOWKV.mjs → describe-M6VXFYVL.mjs} +21 -21
  129. package/dist/cli/describe-core.d.mts +3 -3
  130. package/dist/cli/describe-core.d.ts +3 -3
  131. package/dist/cli/describe-core.js +4 -4
  132. package/dist/cli/describe-core.mjs +3 -3
  133. package/dist/cli/{executions-CAG7YC5K.mjs → executions-4FGRBPJF.mjs} +7 -7
  134. package/dist/cli/{executions-3DU5IXB6.js → executions-GKINJZI6.js} +9 -9
  135. package/dist/cli/{feedback-BQMPTE47.mjs → feedback-D2WMGK3V.mjs} +4 -4
  136. package/dist/cli/{feedback-I65JMCP2.js → feedback-ZH5K7WV7.js} +8 -8
  137. package/dist/cli/git-IDALMZDN.js +25 -0
  138. package/dist/cli/{git-UQUCD7XZ.mjs → git-OCIJ5ME4.mjs} +5 -5
  139. package/dist/cli/index.js +142 -139
  140. package/dist/cli/index.mjs +45 -42
  141. package/dist/cli/{legacy-noops-OLNT2BG5.js → legacy-noops-QNIVP7LO.js} +8 -8
  142. package/dist/cli/{legacy-noops-JXKLHUI3.mjs → legacy-noops-V6Q2X34P.mjs} +5 -5
  143. package/dist/cli/{monitors-DLTHHAFQ.mjs → monitors-2USHTG5G.mjs} +8 -8
  144. package/dist/cli/{monitors-Z5X56AZN.js → monitors-5DNK7W2K.js} +92 -92
  145. package/dist/cli/{org-XBHJLKUG.js → org-RPGM5AN4.js} +73 -73
  146. package/dist/cli/{org-6EZZHD3M.mjs → org-TL2YPYSE.mjs} +7 -7
  147. package/dist/cli/{pages-XVJ34SCN.js → pages-PNUKPFWV.js} +18 -18
  148. package/dist/cli/{pages-MYXROSVK.mjs → pages-XDEW6EE3.mjs} +7 -7
  149. package/dist/cli/{play-ACC4T2XQ.js → play-F5LHRKV5.js} +858 -632
  150. package/dist/cli/{play-5PV4LAHE.mjs → play-WINNQ4HZ.mjs} +372 -146
  151. package/dist/cli/{providers-JCI3KNE4.js → providers-BD4IS5U5.js} +10 -10
  152. package/dist/cli/{providers-2DLUGIFF.mjs → providers-PXGL3FRE.mjs} +7 -7
  153. package/dist/cli/{quickstart-PDSQEDLD.js → quickstart-7LVF6HZF.js} +6 -6
  154. package/dist/cli/{quickstart-NSL3C76K.mjs → quickstart-XTH3UQWZ.mjs} +4 -4
  155. package/dist/cli/{run-X5MXCM4P.mjs → run-MBMUENR7.mjs} +26 -26
  156. package/dist/cli/{run-UCFMHOQC.js → run-NH2BAWPA.js} +41 -41
  157. package/dist/cli/{search-RPEMXV6N.mjs → search-BMRWBV66.mjs} +8 -8
  158. package/dist/cli/search-R3MQJQMT.js +32 -0
  159. package/dist/cli/{search-output-MZH3HLVE.js → search-output-5NNT337U.js} +22 -16
  160. package/dist/cli/{search-output-6UO47B7G.mjs → search-output-QKKRD4MF.mjs} +14 -8
  161. package/dist/cli/{secrets-NLEQURD3.mjs → secrets-AWEXBTJV.mjs} +7 -7
  162. package/dist/cli/{secrets-UFBASYGY.js → secrets-KQSTOREN.js} +16 -16
  163. package/dist/cli/{sessions-JYH4DBEE.js → sessions-DSPLZYCJ.js} +6 -6
  164. package/dist/cli/{sessions-3ALFLWVU.mjs → sessions-RO25Q67X.mjs} +5 -5
  165. package/dist/cli/{settings-MQYKNAMB.js → settings-7JXIKNKI.js} +79 -79
  166. package/dist/cli/{settings-YPRILREA.mjs → settings-JMGXGK4Z.mjs} +12 -12
  167. package/dist/cli/{setup-5IGSHH4E.js → setup-5QFAQQRW.js} +47 -47
  168. package/dist/cli/{setup-DK4GM227.mjs → setup-ZQZ47FHB.mjs} +9 -9
  169. package/dist/cli/skills-EDZXY7DV.js +33 -0
  170. package/dist/cli/{skills-KYBZH3IT.mjs → skills-W3H2DL56.mjs} +7 -7
  171. package/dist/cli/{tools-4B2MHNBN.mjs → tools-2BZCVNBS.mjs} +19 -19
  172. package/dist/cli/tools-2EY2ETCZ.js +56 -0
  173. package/dist/cli/{update-S6VEO7NB.mjs → update-GAWYMGAW.mjs} +9 -9
  174. package/dist/cli/update-UKDQKNBY.js +33 -0
  175. package/dist/cli/{workflow-KXZZYFEF.mjs → workflow-M6LLHQ2I.mjs} +8 -8
  176. package/dist/cli/{workflow-FU2XVPUK.js → workflow-ZPTDFPKW.js} +18 -18
  177. package/dist/{client-DJ3r8VQJ.d.mts → client-BkbDHRIg.d.mts} +1 -1
  178. package/dist/{client-JPSNljtj.d.ts → client-D3hVHXjK.d.ts} +1 -1
  179. package/dist/{client-core-3SJlNsKU.d.mts → client-core-BZoSMKcY.d.mts} +30 -15
  180. package/dist/{client-core-rCoQ5Xz3.d.ts → client-core-DUdVqO_m.d.ts} +30 -15
  181. package/dist/{compiler-manifest-gkO9ZkVg.d.mts → compiler-manifest-BFTwq1HI.d.mts} +1 -1
  182. package/dist/{compiler-manifest-gkO9ZkVg.d.ts → compiler-manifest-BFTwq1HI.d.ts} +1 -1
  183. package/dist/{errors-Cc92LKH-.d.ts → errors-c3pMsylw.d.ts} +1 -1
  184. package/dist/{errors-CeCCOKSA.d.mts → errors-w31ybrQM.d.mts} +1 -1
  185. package/dist/{index-DJQKdV76.d.ts → index-CQ-15-QL.d.ts} +1 -1
  186. package/dist/{index-DsqWJL3Q.d.mts → index-DvNtxucX.d.mts} +1 -1
  187. package/dist/index.d.mts +7 -7
  188. package/dist/index.d.ts +7 -7
  189. package/dist/index.js +10 -10
  190. package/dist/index.mjs +7 -7
  191. package/dist/install-integrity.json +123 -116
  192. package/dist/plays/bundle-play-file.d.mts +3 -3
  193. package/dist/plays/bundle-play-file.d.ts +3 -3
  194. package/dist/plays/bundle-play-file.mjs +2 -2
  195. package/dist/plays/play-description.d.mts +2 -2
  196. package/dist/plays/play-description.d.ts +2 -2
  197. package/dist/plays/run-request.d.mts +2 -2
  198. package/dist/plays/run-request.d.ts +2 -2
  199. package/dist/plays/run-request.js +12 -2
  200. package/dist/plays/run-request.mjs +11 -1
  201. package/dist/release.d.mts +1 -1
  202. package/dist/release.d.ts +1 -1
  203. package/dist/release.js +2 -2
  204. package/dist/release.mjs +1 -1
  205. package/dist/server.d.mts +4 -4
  206. package/dist/server.d.ts +4 -4
  207. package/dist/server.js +6 -6
  208. package/dist/server.mjs +4 -4
  209. package/package.json +1 -1
  210. package/dist/cli/auth-JHQKM6QY.js +0 -43
  211. package/dist/cli/chunk-PHDEQ6W3.js +0 -33
  212. package/dist/cli/describe-RXYQCJRR.js +0 -49
  213. package/dist/cli/git-ADIABNMQ.js +0 -25
  214. package/dist/cli/search-YILJZD36.js +0 -32
  215. package/dist/cli/skills-I4IUZN3U.js +0 -33
  216. package/dist/cli/tools-NLZR7ABS.js +0 -56
  217. package/dist/cli/update-RVDEUJTE.js +0 -33
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  seedToolListScript
3
- } from "./chunk-UDF2CY4D.mjs";
3
+ } from "./chunk-3Z24NKW7.mjs";
4
4
  import {
5
5
  addDescribeOptions
6
- } from "./chunk-AWAFYRFV.mjs";
6
+ } from "./chunk-JD6HKNKD.mjs";
7
7
  import {
8
8
  describeLookupsFor,
9
9
  describeName,
10
10
  findNamed
11
- } from "./chunk-OWUZKXE7.mjs";
11
+ } from "./chunk-J7EENGKJ.mjs";
12
12
  import {
13
13
  SCHEMA_LINE_LIMIT
14
14
  } from "./chunk-JVHOS3K3.mjs";
15
15
  import {
16
16
  DeeplineClient
17
- } from "./chunk-7APXZ3CX.mjs";
17
+ } from "./chunk-3DYU3JQN.mjs";
18
18
  import {
19
19
  printCommandEnvelope
20
- } from "./chunk-NREZRYPU.mjs";
20
+ } from "./chunk-L352NOE3.mjs";
21
21
 
22
22
  // src/cli/commands/describe.ts
23
23
  import { writeFileSync } from "fs";
@@ -1,10 +1,10 @@
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
3
 
4
- var _chunkGONUMUBMjs = require('./chunk-GONUMUBM.js');
4
+ var _chunkBSKPQB2Pjs = require('./chunk-BSKPQB2P.js');
5
5
 
6
6
 
7
- var _chunk75IIHFN6js = require('./chunk-75IIHFN6.js');
7
+ var _chunkDMNVM34Jjs = require('./chunk-DMNVM34J.js');
8
8
 
9
9
  // src/cli/commands/sessions.ts
10
10
 
@@ -139,7 +139,7 @@ function currentSessionFile(agent) {
139
139
  const newestFirst = listSessionFiles(agent).sort(
140
140
  (a, b) => b.mtimeMs - a.mtimeMs
141
141
  );
142
- const sessionId = _chunk75IIHFN6js.agentSessionIdFromEnvironment.call(void 0,
142
+ const sessionId = _chunkDMNVM34Jjs.agentSessionIdFromEnvironment.call(void 0,
143
143
  process.env,
144
144
  agent === "auto" ? void 0 : agent === "claude" ? "claude_code" : "codex"
145
145
  );
@@ -451,7 +451,7 @@ function buildSessionUploadContent(raw) {
451
451
  return { encodedContent: encoded, needsChunking: true };
452
452
  }
453
453
  async function uploadPayload(path, payload) {
454
- const { http } = _chunkGONUMUBMjs.getAuthedHttpClient.call(void 0, );
454
+ const { http } = _chunkBSKPQB2Pjs.getAuthedHttpClient.call(void 0, );
455
455
  return await http.post(path, payload);
456
456
  }
457
457
  async function uploadChunkedSessions(sessions, options) {
@@ -484,7 +484,7 @@ async function uploadChunkedSessions(sessions, options) {
484
484
  ...options.rating ? { rating: options.rating } : {}
485
485
  });
486
486
  const sessionIds = sessions.map((session) => session.sessionId);
487
- _chunkGONUMUBMjs.printCommandEnvelope.call(void 0,
487
+ _chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
488
488
  {
489
489
  ...response,
490
490
  ok: true,
@@ -516,7 +516,7 @@ async function handleSessionsSend(options) {
516
516
  filename: _path.basename.call(void 0, filePath),
517
517
  ...rating ? { rating } : {}
518
518
  });
519
- _chunkGONUMUBMjs.printCommandEnvelope.call(void 0,
519
+ _chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
520
520
  {
521
521
  ...response2,
522
522
  ok: true,
@@ -566,7 +566,7 @@ async function handleSessionsSend(options) {
566
566
  ...rating ? { rating } : {}
567
567
  });
568
568
  const sessionIds = built.map((session) => session.sessionId);
569
- _chunkGONUMUBMjs.printCommandEnvelope.call(void 0,
569
+ _chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
570
570
  {
571
571
  ...response,
572
572
  ok: true,
@@ -674,7 +674,7 @@ ${refreshMeta}
674
674
  </body>
675
675
  </html>`;
676
676
  _fs.writeFileSync.call(void 0, outputPath, html, "utf8");
677
- _chunkGONUMUBMjs.printCommandEnvelope.call(void 0,
677
+ _chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
678
678
  {
679
679
  ok: true,
680
680
  file: outputPath,
@@ -74,11 +74,37 @@ function decodePlayRunPublicStatus(value) {
74
74
  // src/plays/run-request.ts
75
75
  var PLAY_RUN_START_PATH = "/api/v2/plays/run";
76
76
  var CLI_PLAY_RUN_START_PATH = `${PLAY_RUN_START_PATH}/cli`;
77
+ var CLI_PLAY_RUN_CALLER_INTENT_V2_PATH = `${CLI_PLAY_RUN_START_PATH}/caller-intent-v2`;
77
78
  var CLI_PLAY_RUN_SUPPORTED_HEADER = "x-deepline-cli-play-admission";
79
+ var CLI_PLAY_RUN_CALLER_INTENT_V2_SUPPORTED_HEADER = "x-deepline-cli-play-caller-intent-v2";
78
80
  var PLAY_RUN_START_STREAM_PATH = `${PLAY_RUN_START_PATH}?stream=true`;
79
81
  var CLI_PLAY_RUN_START_STREAM_PATH = `${CLI_PLAY_RUN_START_PATH}?stream=true`;
82
+ var CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH = `${CLI_PLAY_RUN_CALLER_INTENT_V2_PATH}?stream=true`;
80
83
  var PLAY_FILES_STAGE_PATH = "/api/v2/plays/files/stage";
81
84
  var PLAY_FILES_STAGE_MINT_PATH = `${PLAY_FILES_STAGE_PATH}/mint`;
85
+ async function awaitWithAbort(value, signal) {
86
+ if (!signal) return await value;
87
+ signal.throwIfAborted();
88
+ let removeAbortListener = () => {
89
+ };
90
+ const aborted = new Promise((_resolve, reject) => {
91
+ const onAbort = () => {
92
+ reject(
93
+ _nullishCoalesce(signal.reason, () => ( Object.assign(new Error("Play admission was aborted."), {
94
+ name: "AbortError"
95
+ })))
96
+ );
97
+ };
98
+ signal.addEventListener("abort", onAbort, { once: true });
99
+ removeAbortListener = () => signal.removeEventListener("abort", onAbort);
100
+ if (signal.aborted) onAbort();
101
+ });
102
+ try {
103
+ return await Promise.race([Promise.resolve(value), aborted]);
104
+ } finally {
105
+ removeAbortListener();
106
+ }
107
+ }
82
108
  var CliPlayAdmissionUnsupportedError = class extends _chunkDIAWYWT5js.DeeplineError {
83
109
  constructor(status) {
84
110
  super(
@@ -88,6 +114,15 @@ var CliPlayAdmissionUnsupportedError = class extends _chunkDIAWYWT5js.DeeplineEr
88
114
  );
89
115
  }
90
116
  };
117
+ var CliPlayAdmissionCallerIntentV2UnsupportedError = class extends _chunkDIAWYWT5js.DeeplineError {
118
+ constructor(status) {
119
+ super(
120
+ "This server does not support versioned CLI Play admission.",
121
+ status,
122
+ "CLI_PLAY_CALLER_INTENT_V2_UNSUPPORTED"
123
+ );
124
+ }
125
+ };
91
126
  function buildPlayRunStartBody(request) {
92
127
  return {
93
128
  ...request.admissionOrgId ? { admissionOrgId: request.admissionOrgId } : {},
@@ -126,10 +161,27 @@ function buildPlayRunStartBody(request) {
126
161
  };
127
162
  }
128
163
  async function preparePlayRunAdmission(http, request, onSubmission, options) {
129
- const capability = options && Object.hasOwn(options, "admissionCapability") ? await options.admissionCapability : await readPlayRunAdmissionCapability(http, options);
130
- const supportsCallerIntent = _optionalChain([capability, 'optionalAccess', _5 => _5.admissionContract]) === "caller-intent-v1";
131
- _optionalChain([options, 'optionalAccess', _6 => _6.signal, 'optionalAccess', _7 => _7.throwIfAborted, 'call', _8 => _8()]);
132
- if (supportsCallerIntent && (!_optionalChain([capability, 'optionalAccess', _9 => _9.orgId]) || request.admissionOrgId && request.admissionOrgId !== capability.orgId)) {
164
+ const assertAdmissionActive = () => {
165
+ _optionalChain([options, 'optionalAccess', _5 => _5.signal, 'optionalAccess', _6 => _6.throwIfAborted, 'call', _7 => _7()]);
166
+ if (_optionalChain([options, 'optionalAccess', _8 => _8.deadlineAt]) !== void 0 && Date.now() >= options.deadlineAt) {
167
+ const error = new Error("Play admission exceeded its wait deadline.");
168
+ error.name = "AbortError";
169
+ throw error;
170
+ }
171
+ };
172
+ const callerIntentV2 = _optionalChain([options, 'optionalAccess', _9 => _9.callerIntentV2]) === true;
173
+ if (callerIntentV2 && (onSubmission || request.maxTotalCredits !== void 0)) {
174
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
175
+ "Versioned CLI Play admission requires a new, unjournaled run without a strict total budget.",
176
+ 409,
177
+ "CLI_PLAY_CALLER_INTENT_V2_INELIGIBLE"
178
+ );
179
+ }
180
+ assertAdmissionActive();
181
+ const capability = callerIntentV2 ? null : options && Object.hasOwn(options, "admissionCapability") ? await awaitWithAbort(options.admissionCapability, options.signal) : await readPlayRunAdmissionCapability(http, options);
182
+ const supportsCallerIntent = callerIntentV2 || _optionalChain([capability, 'optionalAccess', _10 => _10.admissionContract]) === "caller-intent-v1";
183
+ assertAdmissionActive();
184
+ if (supportsCallerIntent && !callerIntentV2 && (!_optionalChain([capability, 'optionalAccess', _11 => _11.orgId]) || request.admissionOrgId && request.admissionOrgId !== capability.orgId)) {
133
185
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
134
186
  "The admission workspace could not be pinned to this request; execution was not submitted.",
135
187
  409,
@@ -143,7 +195,7 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
143
195
  "PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
144
196
  );
145
197
  }
146
- if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _10 => _10.strictTotalBudget]) === "unbounded-v1") {
198
+ if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _12 => _12.strictTotalBudget]) === "unbounded-v1") {
147
199
  if (request.maxTotalCredits === 0) {
148
200
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
149
201
  "A zero-credit total budget cannot admit a Play: sandbox compute is billed even when provider tools are free.",
@@ -157,7 +209,7 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
157
209
  "PLAY_TOTAL_BUDGET_UNBOUNDED"
158
210
  );
159
211
  }
160
- if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _11 => _11.strictTotalBudget]) !== "fail-closed-v1") {
212
+ if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _13 => _13.strictTotalBudget]) !== "fail-closed-v1") {
161
213
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
162
214
  "This server cannot honor a strict total Play budget. Execution was not submitted.",
163
215
  409,
@@ -168,7 +220,7 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
168
220
  JSON.stringify(
169
221
  buildPlayRunStartBody({
170
222
  ...request,
171
- ...supportsCallerIntent ? { admissionOrgId: capability.orgId } : {}
223
+ ...supportsCallerIntent && !callerIntentV2 ? { admissionOrgId: capability.orgId } : {}
172
224
  })
173
225
  )
174
226
  );
@@ -182,13 +234,14 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
182
234
  );
183
235
  }
184
236
  if (onSubmission) {
185
- if (!workflowId || !_optionalChain([capability, 'optionalAccess', _12 => _12.orgId])) {
237
+ if (!workflowId || !_optionalChain([capability, 'optionalAccess', _14 => _14.orgId])) {
186
238
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
187
239
  "This server cannot persist a recoverable submission intent. Execution was not submitted.",
188
240
  409,
189
241
  "PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
190
242
  );
191
243
  }
244
+ assertAdmissionActive();
192
245
  await onSubmission({
193
246
  workflowId,
194
247
  orgId: capability.orgId,
@@ -230,29 +283,48 @@ async function startPlayRun(http, request, headers, options) {
230
283
  } = await preparePlayRunAdmission(
231
284
  http,
232
285
  request,
233
- _optionalChain([options, 'optionalAccess', _13 => _13.onSubmission]),
286
+ _optionalChain([options, 'optionalAccess', _15 => _15.onSubmission]),
234
287
  options
235
288
  );
289
+ return submitPreparedPlayRunAdmission(
290
+ http,
291
+ submittedBody,
292
+ workflowId,
293
+ supportsCallerIntent,
294
+ headers,
295
+ options
296
+ );
297
+ }
298
+ async function submitPreparedPlayRunAdmission(http, submittedBody, workflowId, supportsCallerIntent, headers, options) {
236
299
  let cliAdmissionSupported = false;
300
+ let callerIntentV2Supported = false;
237
301
  let response;
238
302
  try {
239
303
  response = await http.post(
240
- _optionalChain([options, 'optionalAccess', _14 => _14.cliAdmission]) ? CLI_PLAY_RUN_START_PATH : PLAY_RUN_START_PATH,
304
+ _optionalChain([options, 'optionalAccess', _16 => _16.callerIntentV2]) ? CLI_PLAY_RUN_CALLER_INTENT_V2_PATH : _optionalChain([options, 'optionalAccess', _17 => _17.cliAdmission]) ? CLI_PLAY_RUN_START_PATH : PLAY_RUN_START_PATH,
241
305
  submittedBody,
242
306
  headers,
243
307
  {
244
308
  maxRetries: 0,
245
309
  exactUrlOnly: true,
246
- ..._optionalChain([options, 'optionalAccess', _15 => _15.signal]) ? { signal: options.signal } : {},
247
- ..._optionalChain([options, 'optionalAccess', _16 => _16.cliAdmission]) ? {
310
+ ..._optionalChain([options, 'optionalAccess', _18 => _18.signal]) ? { signal: options.signal } : {},
311
+ ..._optionalChain([options, 'optionalAccess', _19 => _19.cliAdmission]) || _optionalChain([options, 'optionalAccess', _20 => _20.callerIntentV2]) ? {
248
312
  onResponse: (response2) => {
249
313
  cliAdmissionSupported = response2.headers.get(CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
314
+ callerIntentV2Supported = response2.headers.get(
315
+ CLI_PLAY_RUN_CALLER_INTENT_V2_SUPPORTED_HEADER
316
+ ) === "true";
250
317
  }
251
318
  } : {}
252
319
  }
253
320
  );
254
321
  } catch (error) {
255
- if (_optionalChain([options, 'optionalAccess', _17 => _17.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
322
+ if (_optionalChain([options, 'optionalAccess', _21 => _21.callerIntentV2]) && !callerIntentV2Supported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
323
+ throw new CliPlayAdmissionCallerIntentV2UnsupportedError(
324
+ error.statusCode
325
+ );
326
+ }
327
+ if (_optionalChain([options, 'optionalAccess', _22 => _22.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
256
328
  throw new CliPlayAdmissionUnsupportedError(error.statusCode);
257
329
  }
258
330
  if (error instanceof _chunkDIAWYWT5js.DeeplineError && ["NETWORK_TIMEOUT", "NETWORK_ERROR", "FETCH_FAILED"].includes(
@@ -277,8 +349,20 @@ async function startPlayRun(http, request, headers, options) {
277
349
  }
278
350
  throw error;
279
351
  }
352
+ if (_optionalChain([options, 'optionalAccess', _23 => _23.callerIntentV2]) && !callerIntentV2Supported) {
353
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
354
+ "The versioned CLI Play admission response did not prove its contract. Inspect this run before submitting again.",
355
+ void 0,
356
+ "PLAY_RUN_ADMISSION_CONTRACT_UNKNOWN",
357
+ {
358
+ ...workflowId ? { runId: workflowId, workflowId } : {},
359
+ admissionState: "unknown",
360
+ recoverySupported: supportsCallerIntent
361
+ }
362
+ );
363
+ }
280
364
  const started = normalizePlayRunStart(response);
281
- if (_optionalChain([options, 'optionalAccess', _18 => _18.cliAdmission]) && (!started.workflowId || started.workflowId === "pending")) {
365
+ if (_optionalChain([options, 'optionalAccess', _24 => _24.cliAdmission]) && (!started.workflowId || started.workflowId === "pending")) {
282
366
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
283
367
  "Play admission returned no run id. Check recent runs before submitting again.",
284
368
  void 0,
@@ -289,7 +373,7 @@ async function startPlayRun(http, request, headers, options) {
289
373
  }
290
374
  function isPlayRunPackage(value) {
291
375
  return Boolean(
292
- 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"
376
+ value && typeof value === "object" && !Array.isArray(value) && value.kind === "play_run" && value.run && typeof _optionalChain([value, 'access', _25 => _25.run, 'optionalAccess', _26 => _26.id]) === "string"
293
377
  );
294
378
  }
295
379
  function normalizePlayRunStart(raw) {
@@ -330,7 +414,7 @@ function schemaMetadata(schema, key) {
330
414
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
331
415
  }
332
416
  function stringMetadata(metadata, key) {
333
- const value = _optionalChain([metadata, 'optionalAccess', _21 => _21[key]]);
417
+ const value = _optionalChain([metadata, 'optionalAccess', _27 => _27[key]]);
334
418
  return typeof value === "string" && value.trim() ? value.trim() : null;
335
419
  }
336
420
  function inputFieldFromCsvArg(csvArg) {
@@ -338,7 +422,7 @@ function inputFieldFromCsvArg(csvArg) {
338
422
  const match = /^\(?\s*input\.([A-Za-z_$][\w$]*)\s*\)?(?:\s*\?\?[\s\S]+)?$/.exec(
339
423
  csvArg.trim()
340
424
  );
341
- return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _22 => _22[1]]), () => ( null));
425
+ return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _28 => _28[1]]), () => ( null));
342
426
  }
343
427
  function fileInputBindingsFromPlaySchema(inputSchema) {
344
428
  const csvInput = schemaMetadata(inputSchema, "csvInput");
@@ -469,7 +553,7 @@ async function uploadStagedFileToPresignedUrl(input) {
469
553
  return;
470
554
  }
471
555
  const text = await response.text().catch(() => "");
472
- 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";
556
+ const egressDenied = response.status === 403 && _optionalChain([response, 'access', _29 => _29.headers, 'access', _30 => _30.get, 'call', _31 => _31("x-deny-reason"), 'optionalAccess', _32 => _32.trim, 'call', _33 => _33(), 'access', _34 => _34.toLowerCase, 'call', _35 => _35()]) === "host_not_allowed";
473
557
  lastError = new (0, _chunkDIAWYWT5js.DeeplineError)(
474
558
  `Direct storage upload of ${input.logicalPath} failed: ${response.status} ${text.slice(0, 200)}`,
475
559
  response.status,
@@ -644,7 +728,7 @@ async function stageFileInputs(input) {
644
728
  if (localFiles.length === 0) {
645
729
  return { inputFile: null, packagedFiles: [] };
646
730
  }
647
- _optionalChain([input, 'access', _30 => _30.onStaging, 'optionalCall', _31 => _31(localFiles.length)]);
731
+ _optionalChain([input, 'access', _36 => _36.onStaging, 'optionalCall', _37 => _37(localFiles.length)]);
648
732
  const uploads = await Promise.all(
649
733
  localFiles.map(
650
734
  async ({ file }) => createStagedFileUpload(file.logicalPath, await file.read(), input.codec)
@@ -699,7 +783,7 @@ function createSessionPlayRunHttp(fetchImpl = (...args) => fetch(...args)) {
699
783
  method: "POST",
700
784
  headers: { "content-type": "application/json", ...headers },
701
785
  body: JSON.stringify(body),
702
- ..._optionalChain([options, 'optionalAccess', _32 => _32.signal]) ? { signal: options.signal } : {}
786
+ ..._optionalChain([options, 'optionalAccess', _38 => _38.signal]) ? { signal: options.signal } : {}
703
787
  }),
704
788
  postFormData: (path, formData) => send(path, {
705
789
  method: "POST",
@@ -740,4 +824,9 @@ function createSessionPlayRunHttp(fetchImpl = (...args) => fetch(...args)) {
740
824
 
741
825
 
742
826
 
743
- 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.readPlayRunAdmissionCapability = readPlayRunAdmissionCapability; 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;
827
+
828
+
829
+
830
+
831
+
832
+ 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_CALLER_INTENT_V2_PATH = CLI_PLAY_RUN_CALLER_INTENT_V2_PATH; exports.CLI_PLAY_RUN_SUPPORTED_HEADER = CLI_PLAY_RUN_SUPPORTED_HEADER; exports.CLI_PLAY_RUN_CALLER_INTENT_V2_SUPPORTED_HEADER = CLI_PLAY_RUN_CALLER_INTENT_V2_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.CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH = CLI_PLAY_RUN_CALLER_INTENT_V2_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.CliPlayAdmissionCallerIntentV2UnsupportedError = CliPlayAdmissionCallerIntentV2UnsupportedError; exports.buildPlayRunStartBody = buildPlayRunStartBody; exports.preparePlayRunAdmission = preparePlayRunAdmission; exports.readPlayRunAdmissionCapability = readPlayRunAdmissionCapability; exports.startPlayRun = startPlayRun; exports.submitPreparedPlayRunAdmission = submitPreparedPlayRunAdmission; 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;
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk5LHU7NUSjs = require('./chunk-5LHU7NUS.js');
5
+ var _chunkS3WQJ5VGjs = require('./chunk-S3WQJ5VG.js');
6
6
 
7
7
 
8
- var _chunk75IIHFN6js = require('./chunk-75IIHFN6.js');
8
+ var _chunkDMNVM34Jjs = require('./chunk-DMNVM34J.js');
9
9
 
10
10
 
11
11
 
@@ -290,8 +290,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
290
290
  var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
291
291
  var defaultBrowserCommandRunner = childProcess;
292
292
  function getAuthedHttpClient() {
293
- const config = _chunk5LHU7NUSjs.resolveConfig.call(void 0, );
294
- return { config, http: new (0, _chunk5LHU7NUSjs.HttpClient)(config) };
293
+ const config = _chunkS3WQJ5VGjs.resolveConfig.call(void 0, );
294
+ return { config, http: new (0, _chunkS3WQJ5VGjs.HttpClient)(config) };
295
295
  }
296
296
  function stableOsUserId() {
297
297
  try {
@@ -631,7 +631,7 @@ function collectLocalEnvInfo() {
631
631
  os: `${process.platform} ${process.arch}`,
632
632
  node_version: process.version,
633
633
  home_dir: homeDir,
634
- agent_runtime: _chunk75IIHFN6js.detectAgentRuntime.call(void 0, )
634
+ agent_runtime: _chunkDMNVM34Jjs.detectAgentRuntime.call(void 0, )
635
635
  };
636
636
  const env = process.env;
637
637
  const optional = {
@@ -878,9 +878,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
878
878
  }
879
879
  function withAgentCommandContext(value) {
880
880
  const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
881
- return _chunk75IIHFN6js.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
881
+ return _chunkDMNVM34Jjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
882
882
  ...valueRecord,
883
- command_context: _chunk5LHU7NUSjs.resolveCliCommandContext.call(void 0, )
883
+ command_context: _chunkS3WQJ5VGjs.resolveCliCommandContext.call(void 0, )
884
884
  } : value;
885
885
  }
886
886
  function printJson(value, fields) {
@@ -0,0 +1,42 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
+
3
+ var _chunkU6WEGDD3js = require('./chunk-U6WEGDD3.js');
4
+
5
+
6
+
7
+
8
+ var _chunkECIXZNSWjs = require('./chunk-ECIXZNSW.js');
9
+
10
+ // src/cli/play-run-admission.ts
11
+ function usesInlinePlayAdmission(command, args) {
12
+ return command === "plays run" && args.includes("--json") && !args.includes("--no-wait");
13
+ }
14
+ function usesCliPlayAdmission(command, args) {
15
+ return command === "plays run" && !args.includes("--no-wait") && (!args.some(
16
+ (arg) => arg === "--run-id-file" || arg.startsWith("--run-id-file=")
17
+ ) || args.includes("--json"));
18
+ }
19
+ async function checkPlayRunCompatibility(baseUrl, maintenancePolicy = "configured", signal) {
20
+ _optionalChain([signal, 'optionalAccess', _ => _.throwIfAborted, 'call', _2 => _2()]);
21
+ if (maintenancePolicy !== "off") _chunkECIXZNSWjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
22
+ const compatibility = await _chunkU6WEGDD3js.traceCliSpan.call(void 0,
23
+ "cli.sdk_compatibility",
24
+ { baseUrl, command: "plays run" },
25
+ () => _chunkECIXZNSWjs.checkSdkCompatibility.call(void 0, baseUrl, {
26
+ command: "plays run",
27
+ persistCache: maintenancePolicy !== "off",
28
+ signal
29
+ })
30
+ );
31
+ _optionalChain([signal, 'optionalAccess', _3 => _3.throwIfAborted, 'call', _4 => _4()]);
32
+ if (compatibility.error) throw compatibility.error;
33
+ _chunkECIXZNSWjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
34
+ quietAdvisory: true
35
+ });
36
+ }
37
+
38
+
39
+
40
+
41
+
42
+ exports.usesInlinePlayAdmission = usesInlinePlayAdmission; exports.usesCliPlayAdmission = usesCliPlayAdmission; exports.checkPlayRunCompatibility = checkPlayRunCompatibility;
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunk4IOY2SCQjs = require('./chunk-4IOY2SCQ.js');
6
+ var _chunkLOX3BISDjs = require('./chunk-LOX3BISD.js');
7
7
 
8
8
 
9
9
 
@@ -31,7 +31,7 @@ var VIEWS = {
31
31
  details: model,
32
32
  lines: [
33
33
  ...unlisted,
34
- ..._chunk4IOY2SCQjs.formatModelDescription.call(void 0, model).trimEnd().split("\n")
34
+ ..._chunkLOX3BISDjs.formatModelDescription.call(void 0, model).trimEnd().split("\n")
35
35
  ]
36
36
  };
37
37
  },
@@ -131,18 +131,18 @@ async function findNamed(reference, options, lookups) {
131
131
  const features = toolFeatures(record);
132
132
  return {
133
133
  described: {
134
- ..._chunk4IOY2SCQjs.describedTool.call(void 0, record, name),
134
+ ..._chunkLOX3BISDjs.describedTool.call(void 0, record, name),
135
135
  // Shown when the tool runs only on your own credentials; otherwise
136
136
  // it is a feature, described with --feature byok.
137
137
  ..._optionalChain([byok, 'optionalAccess', _3 => _3.required]) === true ? { byok } : {},
138
138
  ...features.length ? { features: features.map(({ view: _view, ...feature }) => feature) } : {}
139
139
  },
140
- record: _chunk4IOY2SCQjs.toolMetadataJsonForDescribe.call(void 0,
140
+ record: _chunkLOX3BISDjs.toolMetadataJsonForDescribe.call(void 0,
141
141
  record,
142
142
  name,
143
143
  lookups.seedStarterScript
144
144
  ),
145
- schemas: _chunk4IOY2SCQjs.publicToolSchemas.call(void 0, record),
145
+ schemas: _chunkLOX3BISDjs.publicToolSchemas.call(void 0, record),
146
146
  feature: (featureName, value) => {
147
147
  const feature = features.find(({ name: name2 }) => name2 === featureName);
148
148
  return feature ? describeFeature(record, feature, value, {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getActiveCliProgress
3
- } from "./chunk-EGHYGTJM.mjs";
3
+ } from "./chunk-TMCC7ORQ.mjs";
4
4
  import {
5
5
  DEFAULT_SKILL_AGENTS,
6
6
  KNOWN_SKILL_AGENTS,
@@ -12,7 +12,7 @@ import {
12
12
  sdkCliStateDirPath,
13
13
  skillsAgentPathSegment,
14
14
  writeSdkSkillsLocalVersion
15
- } from "./chunk-FK47YUPC.mjs";
15
+ } from "./chunk-G5PI3RNT.mjs";
16
16
  import {
17
17
  SDK_API_CONTRACT,
18
18
  SDK_API_MAJOR,
@@ -20,13 +20,13 @@ import {
20
20
  agentSessionIdFromEnvironment,
21
21
  deploymentProtectionHeaders,
22
22
  detectAgentRuntime
23
- } from "./chunk-GRE3ID5E.mjs";
23
+ } from "./chunk-GHHJWCMD.mjs";
24
24
  import {
25
25
  DeeplineError
26
26
  } from "./chunk-HBL4PM5Q.mjs";
27
27
  import {
28
28
  SDK_RELEASE
29
- } from "./chunk-SCPFOH5Z.mjs";
29
+ } from "./chunk-TSCUWWTM.mjs";
30
30
 
31
31
  // src/compat.ts
32
32
  import { randomUUID } from "crypto";
@@ -183,6 +183,9 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
183
183
  return { response: null, error: null };
184
184
  }
185
185
  const controller = new AbortController();
186
+ const abortFromCaller = () => controller.abort(options.signal?.reason);
187
+ if (options.signal?.aborted) abortFromCaller();
188
+ else options.signal?.addEventListener("abort", abortFromCaller, { once: true });
186
189
  const timeout = setTimeout(
187
190
  () => controller.abort(),
188
191
  options.timeoutMs ?? CHECK_TIMEOUT_MS
@@ -222,6 +225,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
222
225
  signal: controller.signal
223
226
  });
224
227
  const raw = await response.json().catch(() => null);
228
+ options.signal?.throwIfAborted();
225
229
  if (!raw || typeof raw.ok !== "boolean" || typeof raw.status !== "string") {
226
230
  throw new Error(
227
231
  `SDK compatibility endpoint returned a non-policy response (HTTP ${response.status}).`
@@ -241,6 +245,12 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
241
245
  }
242
246
  return { response: data, error: null };
243
247
  } catch (error) {
248
+ if (options.signal?.aborted) {
249
+ return {
250
+ response: null,
251
+ error: error instanceof Error ? error : new Error(String(error))
252
+ };
253
+ }
244
254
  const cached = readCachedCompatibility(
245
255
  baseUrl,
246
256
  options.command,
@@ -262,6 +272,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
262
272
  };
263
273
  } finally {
264
274
  clearTimeout(timeout);
275
+ options.signal?.removeEventListener("abort", abortFromCaller);
265
276
  }
266
277
  }
267
278
  function isCiEnvironment() {
@@ -16,12 +16,12 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
16
16
  var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
17
17
 
18
18
 
19
- var _chunk2JWG2H2Njs = require('./chunk-2JWG2H2N.js');
19
+ var _chunkHKGXGGIVjs = require('./chunk-HKGXGGIV.js');
20
20
 
21
21
  // src/version.ts
22
- var SDK_VERSION = _chunk2JWG2H2Njs.SDK_RELEASE.version;
23
- var SDK_API_MAJOR = _chunk2JWG2H2Njs.SDK_RELEASE.contracts.api.currentMajor;
24
- var SDK_API_CONTRACT = _nullishCoalesce(_chunk2JWG2H2Njs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
22
+ var SDK_VERSION = _chunkHKGXGGIVjs.SDK_RELEASE.version;
23
+ var SDK_API_MAJOR = _chunkHKGXGGIVjs.SDK_RELEASE.contracts.api.currentMajor;
24
+ var SDK_API_CONTRACT = _nullishCoalesce(_chunkHKGXGGIVjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
25
25
 
26
26
  // src/agent-runtime.ts
27
27
  var _os = require('os');
@@ -126,6 +126,7 @@ var PREFERRED_RECEIPT_GATEWAY_MACHINE_ID_HEADER = "x-deepline-preferred-receipt-
126
126
  var SYNTHETIC_RUN_HEADER = "x-deepline-synthetic-run";
127
127
 
128
128
  // ../play-runtime/test-runtime-seams.ts
129
+ var _crypto = require('crypto');
129
130
  var PLAY_RUNTIME_TEST_FAULT_HEADER = "x-deepline-test-fault";
130
131
  var MAX_RUNTIME_TEST_POLICY_MS = 10 * 6e4;
131
132
  var MAX_RUNNER_HEARTBEAT_SILENCE_MS = 10 * 6e4;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveShellSpawn
3
- } from "./chunk-PRL7EKJZ.mjs";
3
+ } from "./chunk-CW6TAQBF.mjs";
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  import { spawnSync } from "child_process";
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; } var _class;
2
2
 
3
- var _chunkGONUMUBMjs = require('./chunk-GONUMUBM.js');
3
+ var _chunkBSKPQB2Pjs = require('./chunk-BSKPQB2P.js');
4
4
 
5
5
  // src/cli/progress.ts
6
6
  var _worker_threads = require('worker_threads');
@@ -17,7 +17,7 @@ var CliProgress = (_class = class {
17
17
 
18
18
  // --json output is one JSON document: progress never renders under it.
19
19
  constructor(enabled) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);
20
- this.enabled = enabled && !_chunkGONUMUBMjs.isJsonOutputMode.call(void 0, );
20
+ this.enabled = enabled && !_chunkBSKPQB2Pjs.isJsonOutputMode.call(void 0, );
21
21
  }
22
22
  setLogWriter(writer) {
23
23
  this.logWriter = writer;
@@ -49,7 +49,7 @@ var CliProgress = (_class = class {
49
49
  this.logWriter(line);
50
50
  return;
51
51
  }
52
- if (_chunkGONUMUBMjs.isJsonOutputMode.call(void 0, )) return;
52
+ if (_chunkBSKPQB2Pjs.isJsonOutputMode.call(void 0, )) return;
53
53
  if (!this.enabled) {
54
54
  process.stderr.write(`${line}
55
55
  `);