deepline 0.3.409 → 0.3.410

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 (213) 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/play-data-plane/r2.ts +3 -1
  21. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +277 -76
  22. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/dataset-row-input.ts +124 -0
  24. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +6 -62
  25. package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +1 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +67 -0
  27. package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +64 -6
  28. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +1 -5
  29. package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +1 -1
  30. package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +3 -0
  31. package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +10 -0
  32. package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +3 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/egress-probe.ts +3 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +26 -16
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +36 -11
  36. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +35 -0
  37. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +21 -0
  38. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +21 -6
  39. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +11 -2
  40. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +85 -20
  41. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +71 -13
  42. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-execution-queries.ts +100 -0
  43. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +9 -5
  44. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +337 -146
  45. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +26 -12
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +3 -1
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +425 -102
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +4 -0
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +9 -0
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +181 -124
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +152 -0
  53. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +5 -3
  54. package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +31 -0
  55. package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +10 -0
  56. package/dist/bundling-sources/shared_libs/plays/ambiguous-write-error.ts +25 -0
  57. package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +4 -0
  58. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +63 -68
  59. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +129 -63
  60. package/dist/bundling-sources/shared_libs/plays/contracts.ts +14 -0
  61. package/dist/bundling-sources/shared_libs/plays/enrich-play-compiler.ts +58 -16
  62. package/dist/bundling-sources/shared_libs/plays/fetch-http-error.ts +50 -0
  63. package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +351 -0
  64. package/dist/bundling-sources/shared_libs/plays/tool-list-getter-mode.ts +9 -0
  65. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
  66. package/dist/cli/{auth-5HIIACF7.mjs → auth-LLXLIILR.mjs} +6 -6
  67. package/dist/cli/auth-UG4WOYGL.js +40 -0
  68. package/dist/cli/{billing-EVZ3ZWKC.mjs → billing-5FVXZYAC.mjs} +8 -8
  69. package/dist/cli/{billing-4275N7FL.js → billing-NFPK7GYP.js} +84 -84
  70. package/dist/cli/{chunk-ZAAKSJAS.js → chunk-27GJKC5Q.js} +17 -10
  71. package/dist/cli/{chunk-UHNDVD3P.js → chunk-2H4EY7KH.js} +100 -41
  72. package/dist/cli/{chunk-TQNHMWUR.mjs → chunk-2YR7BIIC.mjs} +5 -2
  73. package/dist/cli/{chunk-AU4OFDFX.js → chunk-36AHOWVS.js} +26 -26
  74. package/dist/cli/{chunk-OSDXE27V.mjs → chunk-4PG4ARL2.mjs} +17 -10
  75. package/dist/cli/{chunk-PBZYY7VZ.mjs → chunk-4XQLVUC7.mjs} +734 -511
  76. package/dist/cli/chunk-5TUGWDEB.js +313 -0
  77. package/dist/cli/{chunk-DEC3JECC.js → chunk-5UUQAGJS.js} +5 -2
  78. package/dist/cli/{chunk-JRAVVJ3T.mjs → chunk-5V5Y37BC.mjs} +2 -2
  79. package/dist/cli/{chunk-PMVFAYL7.mjs → chunk-63ILLN5H.mjs} +2 -2
  80. package/dist/cli/{chunk-V76R6HMV.js → chunk-63S7X326.js} +1029 -806
  81. package/dist/cli/{chunk-VWBTTJYQ.mjs → chunk-6PGATQ6L.mjs} +6 -3
  82. package/dist/cli/{chunk-6BJK4EJ3.mjs → chunk-AARWVK4C.mjs} +2132 -65
  83. package/dist/cli/{chunk-FERRDNMO.js → chunk-AD47BXN2.js} +5 -5
  84. package/dist/cli/{chunk-GAICVLKL.js → chunk-D37FEBES.js} +2 -2
  85. package/dist/cli/{chunk-S6R3OX7B.js → chunk-E4CABWXL.js} +25 -2
  86. package/dist/cli/{chunk-NXGCO4JB.mjs → chunk-E4IXDAZI.mjs} +5 -0
  87. package/dist/cli/chunk-EQ4Z7RJW.mjs +35 -0
  88. package/dist/cli/chunk-FR2ILQ4G.mjs +8 -0
  89. package/dist/cli/{chunk-FJCIUF34.js → chunk-FVLNYDI4.js} +128 -376
  90. package/dist/cli/{chunk-O3VSXP2F.js → chunk-FZJAM576.js} +50 -50
  91. package/dist/cli/{chunk-BZAMOCPA.mjs → chunk-IMZ56EOH.mjs} +3 -3
  92. package/dist/cli/{chunk-N44JHMKY.mjs → chunk-IPG42SD2.mjs} +452 -138
  93. package/dist/cli/chunk-J33TSWO5.js +8 -0
  94. package/dist/cli/{chunk-BEVLCKXG.mjs → chunk-JNXJZ577.mjs} +1 -1
  95. package/dist/cli/{chunk-JI2B4RZP.mjs → chunk-KCC3FKIW.mjs} +71 -12
  96. package/dist/cli/{chunk-6IKARAYD.mjs → chunk-L2VKAASU.mjs} +23 -0
  97. package/dist/cli/{chunk-WLOCMJWV.js → chunk-LTFL4JRN.js} +426 -721
  98. package/dist/cli/{chunk-YHPYUZZX.mjs → chunk-MAMVGOSC.mjs} +1 -1
  99. package/dist/cli/{chunk-NZSF57UO.mjs → chunk-MN2OWLFA.mjs} +2 -2
  100. package/dist/cli/{chunk-YD7B53RW.js → chunk-NF4V5DTY.js} +12 -12
  101. package/dist/cli/{chunk-Q2E4E4FJ.js → chunk-NPBJI7RE.js} +8 -8
  102. package/dist/cli/chunk-NTVLGHFM.js +501 -0
  103. package/dist/cli/{chunk-HQXL5526.mjs → chunk-NUX2QHNC.mjs} +1 -1
  104. package/dist/cli/{chunk-JGHG4NBA.js → chunk-OBB4QXHA.js} +19 -4
  105. package/dist/cli/{chunk-SEFMGO3Z.js → chunk-OQQOXSYA.js} +2184 -117
  106. package/dist/cli/chunk-OZ6E3IRZ.js +6084 -0
  107. package/dist/cli/{chunk-7P5AA3SN.js → chunk-PPDBRJRW.js} +6 -1
  108. package/dist/cli/{chunk-FHPCKULR.mjs → chunk-PZSLPBDA.mjs} +2 -2
  109. package/dist/cli/{chunk-ILHRA7AD.js → chunk-QADCFSGH.js} +7 -7
  110. package/dist/cli/{chunk-RTCDW2GU.js → chunk-QJI5FIOW.js} +170 -49
  111. package/dist/cli/{chunk-WYQO2CBS.mjs → chunk-QL22Y56M.mjs} +149 -28
  112. package/dist/cli/{chunk-2PRO2JTX.mjs → chunk-RFB25DSQ.mjs} +36 -284
  113. package/dist/cli/chunk-T44IIOT6.mjs +501 -0
  114. package/dist/cli/chunk-VK2LZ5IP.js +35 -0
  115. package/dist/cli/chunk-VKKVSFRD.js +62 -0
  116. package/dist/cli/{chunk-2GI3QD3L.js → chunk-VYKV5XHL.js} +644 -330
  117. package/dist/cli/{chunk-GSK6NHVM.js → chunk-WU4U6VSB.js} +5 -5
  118. package/dist/cli/chunk-XHLKJOTN.mjs +313 -0
  119. package/dist/cli/{chunk-IT3XBJQR.mjs → chunk-XIHWSXSV.mjs} +330 -625
  120. package/dist/cli/chunk-XNZJKRJA.mjs +6084 -0
  121. package/dist/cli/chunk-ZCALLYF6.mjs +62 -0
  122. package/dist/cli/{chunk-WHG43Z67.js → chunk-ZFZ427HN.js} +11 -8
  123. package/dist/cli/{chunk-J6DCKJNM.mjs → chunk-ZKYEW55U.mjs} +16 -1
  124. package/dist/cli/{csv-BBOTCGQY.js → csv-7U3FJYKZ.js} +14 -14
  125. package/dist/cli/{csv-A2MP6EFV.mjs → csv-ZWLDMM4A.mjs} +5 -5
  126. package/dist/cli/{db-G4CODDCA.js → db-DNCGV5PC.js} +42 -47
  127. package/dist/cli/{db-3W5DMTUX.mjs → db-IMYXVMGI.mjs} +15 -20
  128. package/dist/cli/{describe-XYJ2ZT4M.mjs → describe-Q23DWJUK.mjs} +20 -15
  129. package/dist/cli/{describe-PQTQ5B6F.js → describe-S34JUX5W.js} +27 -22
  130. package/dist/cli/describe-core.d.mts +2 -2
  131. package/dist/cli/describe-core.d.ts +2 -2
  132. package/dist/cli/describe-core.js +6 -6
  133. package/dist/cli/describe-core.mjs +5 -5
  134. package/dist/cli/{executions-UR67CA5H.mjs → executions-A73EUGSI.mjs} +8 -8
  135. package/dist/cli/{executions-TLANVR7Y.js → executions-XOMPX2YJ.js} +10 -10
  136. package/dist/cli/{feedback-WHCMGEIL.mjs → feedback-N4GJ2POI.mjs} +11 -7
  137. package/dist/cli/{feedback-6C2YTRJL.js → feedback-QTCHNJJH.js} +13 -9
  138. package/dist/cli/{git-GWLB6VSA.mjs → git-4Q3JIQYZ.mjs} +6 -6
  139. package/dist/cli/git-I6CPBEVG.js +24 -0
  140. package/dist/cli/index.js +236 -348
  141. package/dist/cli/index.mjs +162 -274
  142. package/dist/cli/{legacy-noops-KF4XIFEF.mjs → legacy-noops-3SOVGFF7.mjs} +6 -6
  143. package/dist/cli/{legacy-noops-ZUFA7RWI.js → legacy-noops-4OSHZM34.js} +9 -9
  144. package/dist/cli/{monitors-TB3K2IVE.js → monitors-LVE2KZNG.js} +94 -94
  145. package/dist/cli/{monitors-6UOIDIMB.mjs → monitors-QP2XID2B.mjs} +8 -8
  146. package/dist/cli/{org-WGHHMVDZ.mjs → org-IVRETVQA.mjs} +8 -8
  147. package/dist/cli/{org-CKWMBPIR.js → org-XFLK5IAP.js} +68 -68
  148. package/dist/cli/{play-LYPAXCLD.mjs → play-DE7VH6NU.mjs} +533 -98
  149. package/dist/cli/{play-N2B3KAVS.js → play-XXTPPP23.js} +1067 -632
  150. package/dist/cli/{providers-UR42MD6Z.js → providers-DLD3I4JF.js} +11 -11
  151. package/dist/cli/{providers-6DI5BVZJ.mjs → providers-GX2NIZQQ.mjs} +8 -8
  152. package/dist/cli/{quickstart-MNA2S6PO.mjs → quickstart-72B4L4PK.mjs} +5 -5
  153. package/dist/cli/{quickstart-FCJG4XGB.js → quickstart-XNS3HSWC.js} +7 -7
  154. package/dist/cli/search-6NCH4HB5.js +30 -0
  155. package/dist/cli/{search-VPPYUJ2M.mjs → search-SUTRANJI.mjs} +9 -9
  156. package/dist/cli/{secrets-QOSMVO36.js → secrets-6OBLOVEV.js} +17 -17
  157. package/dist/cli/{secrets-DRI4W7Z5.mjs → secrets-FPFXXNUH.mjs} +8 -8
  158. package/dist/cli/sessions-235532DR.js +16 -0
  159. package/dist/cli/{sessions-DQNUKP43.mjs → sessions-R25I4QKN.mjs} +6 -6
  160. package/dist/cli/{settings-DWDK3Y2R.mjs → settings-AOP6F5PZ.mjs} +12 -12
  161. package/dist/cli/{settings-JUGGCOPS.js → settings-VL5FOFPN.js} +79 -79
  162. package/dist/cli/{setup-AWBHNYXK.js → setup-BSC67YT3.js} +45 -44
  163. package/dist/cli/{setup-D5DWVNY4.mjs → setup-ZMPHBHVJ.mjs} +11 -10
  164. package/dist/cli/skills-3IWLYYRL.js +29 -0
  165. package/dist/cli/{skills-YV2XR35J.mjs → skills-KF65TVFO.mjs} +7 -7
  166. package/dist/cli/tools-LR66SPYU.js +44 -0
  167. package/dist/cli/{tools-VFJYHNV2.mjs → tools-SX4XIPM7.mjs} +19 -14
  168. package/dist/cli/{update-IM6VOTGL.mjs → update-QRMFRAQQ.mjs} +11 -9
  169. package/dist/cli/update-SP7UEO53.js +31 -0
  170. package/dist/cli/{workflow-26URBWPV.mjs → workflow-FOEEEB7G.mjs} +44 -20
  171. package/dist/cli/{workflow-3BS6U6SL.js → workflow-KOCK2FLW.js} +54 -30
  172. package/dist/{client-BfInrZPB.d.mts → client-74k4IPh6.d.mts} +135 -54
  173. package/dist/{client-BMjJFpan.d.ts → client-C1IK1f8c.d.ts} +135 -54
  174. package/dist/{compiler-manifest-Ycx-hoAr.d.mts → compiler-manifest-lzWpbV3w.d.mts} +83 -66
  175. package/dist/{compiler-manifest-Ycx-hoAr.d.ts → compiler-manifest-lzWpbV3w.d.ts} +83 -66
  176. package/dist/{index-CZXgiN3E.d.mts → index-C8Cy-YTm.d.ts} +5 -1
  177. package/dist/{index-NPG5pqxQ.d.ts → index-CtNK-0nI.d.mts} +5 -1
  178. package/dist/index.d.mts +47 -9
  179. package/dist/index.d.ts +47 -9
  180. package/dist/index.js +17 -14
  181. package/dist/index.mjs +13 -10
  182. package/dist/install-integrity.json +118 -102
  183. package/dist/plays/bundle-play-file.d.mts +3 -3
  184. package/dist/plays/bundle-play-file.d.ts +3 -3
  185. package/dist/plays/bundle-play-file.mjs +5 -4
  186. package/dist/plays/csv-data-input.js +3 -3
  187. package/dist/plays/csv-data-input.mjs +2 -2
  188. package/dist/plays/play-description.d.mts +2 -2
  189. package/dist/plays/play-description.d.ts +2 -2
  190. package/dist/plays/run-request.d.mts +2 -2
  191. package/dist/plays/run-request.d.ts +2 -2
  192. package/dist/plays/run-request.js +11 -3
  193. package/dist/plays/run-request.mjs +10 -2
  194. package/dist/release.d.mts +15 -6
  195. package/dist/release.d.ts +15 -6
  196. package/dist/release.js +2 -2
  197. package/dist/release.mjs +1 -1
  198. package/package.json +2 -2
  199. package/dist/cli/auth-F6BX32XZ.js +0 -40
  200. package/dist/cli/chunk-264PC2RN.mjs +0 -83
  201. package/dist/cli/chunk-44ZTYHMQ.mjs +0 -155
  202. package/dist/cli/chunk-53HN7WZN.js +0 -392
  203. package/dist/cli/chunk-7AALNGTA.mjs +0 -392
  204. package/dist/cli/chunk-ALD4COBH.js +0 -155
  205. package/dist/cli/chunk-CLJGSOVM.mjs +0 -1716
  206. package/dist/cli/chunk-WNUR6VP5.js +0 -83
  207. package/dist/cli/chunk-Z4VNJOF7.js +0 -1716
  208. package/dist/cli/git-VQFF6D7C.js +0 -24
  209. package/dist/cli/search-NCEEONMQ.js +0 -30
  210. package/dist/cli/sessions-3WYKQABW.js +0 -16
  211. package/dist/cli/skills-AKPAJVSO.js +0 -29
  212. package/dist/cli/tools-RBKEK6PM.js +0 -39
  213. 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;
@@ -49,8 +49,11 @@ var SDK_RELEASE = {
49
49
  // getters keep their established compatibility behavior.
50
50
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
51
51
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
52
- version: "0.3.409",
53
- updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
52
+ version: "0.3.410",
53
+ updateSummary: {
54
+ introducedIn: "0.3.90",
55
+ summary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release."
56
+ },
54
57
  packageCapabilities: {
55
58
  updatePreferences: 1,
56
59
  skillsGuidance: 1
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkYD7B53RWjs = require('./chunk-YD7B53RW.js');
5
+ var _chunkNF4V5DTYjs = require('./chunk-NF4V5DTY.js');
6
6
 
7
7
 
8
- var _chunkFJCIUF34js = require('./chunk-FJCIUF34.js');
8
+ var _chunkFVLNYDI4js = require('./chunk-FVLNYDI4.js');
9
9
 
10
10
  // src/cli/commands/git.ts
11
11
  function shellQuote(value) {
@@ -32,11 +32,11 @@ function renderDeployment(deployment) {
32
32
  return `${deployment.id} ${source} (${kind}) - ${deployment.status}${suffix}`;
33
33
  }
34
34
  async function handleList(options) {
35
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
35
+ const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
36
36
  const payload = await http.get(
37
37
  `/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
38
38
  );
39
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
39
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
40
40
  {
41
41
  projects: payload.projects,
42
42
  count: payload.projects.length,
@@ -73,7 +73,7 @@ function describeInstallationStatus(installation) {
73
73
  }
74
74
  }
75
75
  async function handleStatus(options) {
76
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
76
+ const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
77
77
  const payload = await http.get("/api/v2/github/installation");
78
78
  const installation = payload.installation;
79
79
  const others = (_nullishCoalesce(payload.installations, () => ( []))).filter(
@@ -136,7 +136,7 @@ async function handleStatus(options) {
136
136
  )
137
137
  );
138
138
  }
139
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
139
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
140
140
  {
141
141
  installation,
142
142
  installations: _nullishCoalesce(payload.installations, () => ( [])),
@@ -147,10 +147,10 @@ async function handleStatus(options) {
147
147
  );
148
148
  }
149
149
  async function handleRepos(options) {
150
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
150
+ const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
151
151
  const query = options.installation ? `?installationId=${encodeURIComponent(options.installation)}` : "";
152
152
  const payload = await http.get(`/api/v2/github/repos${query}`);
153
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
153
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
154
154
  {
155
155
  installation: payload.installation,
156
156
  repositories: payload.repositories,
@@ -171,7 +171,7 @@ async function handleRepos(options) {
171
171
  }
172
172
  async function resolveRepoId(repo, installation) {
173
173
  if (/^\d+$/.test(repo)) return Number(repo);
174
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
174
+ const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
175
175
  const query = installation ? `?installationId=${encodeURIComponent(installation)}` : "";
176
176
  const payload = await http.get(
177
177
  `/api/v2/github/repos${query}`
@@ -188,7 +188,7 @@ async function resolveRepoId(repo, installation) {
188
188
  }
189
189
  async function handleLink(repo, options) {
190
190
  const repoId = await resolveRepoId(repo, options.installation);
191
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
191
+ const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
192
192
  const payload = await http.post("/api/v2/play-projects", {
193
193
  repoId,
194
194
  ...options.installation !== void 0 ? { installationId: options.installation } : {},
@@ -197,7 +197,7 @@ async function handleLink(repo, options) {
197
197
  ...options.branch !== void 0 ? { productionBranch: options.branch } : {},
198
198
  ...options.prChecks !== void 0 ? { checkOnPullRequest: options.prChecks } : {}
199
199
  });
200
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
200
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
201
201
  {
202
202
  project: payload.project,
203
203
  render: {
@@ -220,11 +220,11 @@ async function handleLink(repo, options) {
220
220
  );
221
221
  }
222
222
  async function handleGet(id, options) {
223
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
223
+ const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
224
224
  const payload = await http.get(
225
225
  `/api/v2/play-projects/${encodeURIComponent(id)}`
226
226
  );
227
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
227
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
228
228
  {
229
229
  project: payload.project,
230
230
  render: {
@@ -240,7 +240,7 @@ async function handleGet(id, options) {
240
240
  );
241
241
  }
242
242
  async function handleSet(id, options) {
243
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
243
+ const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
244
244
  const payload = await http.patch(
245
245
  `/api/v2/play-projects/${encodeURIComponent(id)}`,
246
246
  {
@@ -251,7 +251,7 @@ async function handleSet(id, options) {
251
251
  ...options.disabled !== void 0 ? { disabled: options.disabled } : {}
252
252
  }
253
253
  );
254
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
254
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
255
255
  {
256
256
  project: payload.project,
257
257
  render: {
@@ -264,9 +264,9 @@ async function handleSet(id, options) {
264
264
  );
265
265
  }
266
266
  async function handleUnlink(id, options) {
267
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
267
+ const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
268
268
  await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
269
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
269
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
270
270
  {
271
271
  ok: true,
272
272
  id,
@@ -286,10 +286,10 @@ async function handleUnlink(id, options) {
286
286
  );
287
287
  }
288
288
  async function handleConnect(options) {
289
- const baseUrl = _chunkFJCIUF34js.resolveBaseUrlOnly.call(void 0, );
289
+ const baseUrl = _chunkFVLNYDI4js.resolveBaseUrlOnly.call(void 0, );
290
290
  const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
291
- const opened = _chunkYD7B53RWjs.openInBrowser.call(void 0, connectUrl);
292
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
291
+ const opened = _chunkNF4V5DTYjs.openInBrowser.call(void 0, connectUrl);
292
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
293
293
  {
294
294
  connectUrl,
295
295
  browser: opened,
@@ -311,7 +311,7 @@ async function handleConnect(options) {
311
311
  );
312
312
  }
313
313
  async function handleDeploymentsList(options) {
314
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
314
+ const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
315
315
  const query = new URLSearchParams();
316
316
  if (options.repo) query.set("projectId", options.repo);
317
317
  if (options.limit) query.set("limit", options.limit);
@@ -319,7 +319,7 @@ async function handleDeploymentsList(options) {
319
319
  const payload = await http.get(
320
320
  `/api/v2/deployments${suffix}`
321
321
  );
322
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
322
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
323
323
  {
324
324
  deployments: payload.deployments,
325
325
  count: payload.deployments.length,
@@ -363,12 +363,12 @@ function renderDeploymentMonitorLines(results) {
363
363
  ]);
364
364
  }
365
365
  async function handleDeploymentGet(id, options) {
366
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
366
+ const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
367
367
  const payload = await http.get(`/api/v2/deployments/${encodeURIComponent(id)}`);
368
368
  const playLines = renderDeploymentPlayLines(payload.deployment.results);
369
369
  const monitorLines = renderDeploymentMonitorLines(payload.deployment.results);
370
370
  const repository = _nullishCoalesce(_optionalChain([payload, 'access', _10 => _10.project, 'optionalAccess', _11 => _11.repoFullName]), () => ( payload.deployment.repoFullName));
371
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
371
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
372
372
  {
373
373
  deployment: payload.deployment,
374
374
  project: payload.project,
@@ -387,9 +387,9 @@ async function handleDeploymentGet(id, options) {
387
387
  );
388
388
  }
389
389
  async function handleDeploymentCancel(id, options) {
390
- const { http } = _chunkYD7B53RWjs.getAuthedHttpClient.call(void 0, );
390
+ const { http } = _chunkNF4V5DTYjs.getAuthedHttpClient.call(void 0, );
391
391
  const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
392
- _chunkYD7B53RWjs.printCommandEnvelope.call(void 0,
392
+ _chunkNF4V5DTYjs.printCommandEnvelope.call(void 0,
393
393
  {
394
394
  cancelled: payload.cancelled,
395
395
  deployment: payload.deployment,
@@ -51,16 +51,23 @@ function writeObservation(observation) {
51
51
  const invocationId = process.env.DEEPLINE_EXECUTION_OBSERVATION_ID;
52
52
  if (!path || !invocationId) return;
53
53
  const pending = `${path}.pending`;
54
- writeFileSync(
55
- pending,
56
- JSON.stringify({
57
- schema_version: 1,
58
- invocation_id: invocationId,
59
- ...observation
60
- }),
61
- { mode: 384 }
62
- );
63
- renameSync(pending, path);
54
+ try {
55
+ writeFileSync(
56
+ pending,
57
+ JSON.stringify({
58
+ schema_version: 1,
59
+ invocation_id: invocationId,
60
+ ...observation
61
+ }),
62
+ { mode: 384 }
63
+ );
64
+ renameSync(pending, path);
65
+ } catch {
66
+ console.error(
67
+ "[execution-observation] could not write the configured diagnostic sink",
68
+ { kind: observation.kind }
69
+ );
70
+ }
64
71
  }
65
72
  function recordApiResponse(observation) {
66
73
  writeObservation({