deepline 0.3.484 → 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 (209) 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/play-data-plane/sheet-column-storage.ts +32 -3
  10. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +126 -41
  11. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +231 -25
  12. package/dist/bundling-sources/shared_libs/play-runtime/daytona-runtime-config.ts +9 -0
  13. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +130 -19
  14. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +105 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +4 -2
  16. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +194 -56
  17. package/dist/bundling-sources/shared_libs/play-runtime/log-provenance.ts +11 -6
  18. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +3 -0
  19. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/ports.ts +2 -0
  20. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/postgres-adapter.ts +2 -1
  21. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +30 -0
  22. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +195 -2
  23. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +20 -1
  24. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +15 -0
  25. package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +2 -2
  26. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +102 -23
  27. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/progress-sidecar.ts +9 -1
  28. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-control-transport.ts +25 -5
  29. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +133 -82
  30. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +58 -16
  31. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-sandbox-absence.ts +171 -0
  32. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +69 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +100 -40
  34. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +8 -0
  35. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +67 -9
  36. package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +5 -5
  37. package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +6 -3
  38. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-errors.ts +14 -0
  39. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-writer.ts +87 -31
  40. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +18 -0
  41. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/index.ts +19 -0
  42. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +14 -0
  43. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +204 -6
  44. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +39 -0
  45. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +12 -1
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +26 -0
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +44 -15
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +60 -11
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +649 -38
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +6 -1
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +17 -0
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +25 -33
  53. package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +12 -0
  54. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +21 -0
  55. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -1
  56. package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +1 -1
  57. package/dist/cli/auth-ABZBH55L.js +43 -0
  58. package/dist/cli/{auth-EBFOTF7X.mjs → auth-OWMUENCU.mjs} +5 -5
  59. package/dist/cli/{billing-G2G3EF3I.js → billing-2FMNQGOX.js} +80 -80
  60. package/dist/cli/{billing-2ZOIMW5V.mjs → billing-JX4H3VFF.mjs} +7 -7
  61. package/dist/cli/{chunk-M4PG7FGC.js → chunk-2ILND7XX.js} +2 -2
  62. package/dist/cli/{chunk-WXRM3UC6.mjs → chunk-2ZEQ43B7.mjs} +3 -3
  63. package/dist/cli/{chunk-PU52JXKA.mjs → chunk-3DBW6C7M.mjs} +13 -4
  64. package/dist/cli/{chunk-4OVHIWE7.mjs → chunk-3DYU3JQN.mjs} +2 -2
  65. package/dist/cli/{chunk-QIDDTIVZ.js → chunk-3OF7NSGR.js} +322 -294
  66. package/dist/cli/{chunk-YWC5AN26.mjs → chunk-3Z24NKW7.mjs} +62 -34
  67. package/dist/cli/{chunk-RLLEH2SP.js → chunk-5DCQWQCP.js} +26 -26
  68. package/dist/cli/{chunk-DEXSQGXB.mjs → chunk-62PJ6PK7.mjs} +5 -5
  69. package/dist/cli/{chunk-6NPWXE32.mjs → chunk-676NZ7K4.mjs} +1 -1
  70. package/dist/cli/{chunk-FRD5WFT4.js → chunk-775AZTO7.js} +323 -247
  71. package/dist/cli/{chunk-4OEOM6GP.mjs → chunk-ACTUAZYP.mjs} +5 -5
  72. package/dist/cli/{chunk-ZOKM7DVA.js → chunk-AFADYKFE.js} +8 -8
  73. package/dist/cli/{chunk-GVAENVIG.js → chunk-AUQQVDAB.js} +110 -21
  74. package/dist/cli/{chunk-U7IJAGWB.js → chunk-BSKPQB2P.js} +7 -7
  75. package/dist/cli/chunk-C6QWRSMQ.js +42 -0
  76. package/dist/cli/{chunk-AK7UKQ5R.js → chunk-CSBMKHTV.js} +5 -5
  77. package/dist/cli/{chunk-YHA3EV3I.mjs → chunk-CW6TAQBF.mjs} +15 -4
  78. package/dist/cli/{chunk-UT4YMA2N.js → chunk-DMNVM34J.js} +5 -4
  79. package/dist/cli/{chunk-XZXIWPT3.mjs → chunk-E73JXJA3.mjs} +1 -1
  80. package/dist/cli/{chunk-5KNRQWHE.js → chunk-EC2CVPN5.js} +3 -3
  81. package/dist/cli/{chunk-IXWQOVNW.js → chunk-ECIXZNSW.js} +87 -76
  82. package/dist/cli/{chunk-LTZXLYKE.mjs → chunk-FJY6K3BG.mjs} +93 -17
  83. package/dist/cli/{chunk-TRLDJNVE.mjs → chunk-G5PI3RNT.mjs} +1 -1
  84. package/dist/cli/{chunk-WYUCDLVR.mjs → chunk-GHHJWCMD.mjs} +2 -1
  85. package/dist/cli/{chunk-FQK7BULS.js → chunk-HKGXGGIV.js} +1 -1
  86. package/dist/cli/{chunk-2AWYJXBX.js → chunk-IHMYIHF4.js} +5 -5
  87. package/dist/cli/{chunk-SD7QWZTV.mjs → chunk-INW22YP7.mjs} +1 -1
  88. package/dist/cli/{chunk-OWUZKXE7.mjs → chunk-J7EENGKJ.mjs} +1 -1
  89. package/dist/cli/{chunk-TIRSKEZH.mjs → chunk-JD6HKNKD.mjs} +1 -1
  90. package/dist/cli/{chunk-OHKKDPA5.js → chunk-JQXUWYWX.js} +13 -13
  91. package/dist/cli/{chunk-EACX7QXO.mjs → chunk-KZTNNLIL.mjs} +2 -2
  92. package/dist/cli/{chunk-7K5CWKKZ.mjs → chunk-L352NOE3.mjs} +2 -2
  93. package/dist/cli/{chunk-KGOC6HGI.js → chunk-L7IQ3DFH.js} +53 -53
  94. package/dist/cli/{chunk-4IOY2SCQ.js → chunk-LOX3BISD.js} +4 -4
  95. package/dist/cli/{chunk-6GRZEYSG.js → chunk-NKPTM7SK.js} +7 -7
  96. package/dist/cli/{chunk-VEVGM6B5.js → chunk-NLRTFJGH.js} +14 -14
  97. package/dist/cli/{chunk-UKM74PAA.js → chunk-NRNWPWBW.js} +37 -37
  98. package/dist/cli/{chunk-HNRELVCS.mjs → chunk-ONONSV2Q.mjs} +96 -7
  99. package/dist/cli/{chunk-CYWBAV5H.js → chunk-OW4OTEFF.js} +16 -16
  100. package/dist/cli/{chunk-5K5CAND4.mjs → chunk-RZE5I2XJ.mjs} +4 -4
  101. package/dist/cli/{chunk-3XQIVEAT.js → chunk-S3WQJ5VG.js} +3 -3
  102. package/dist/cli/{chunk-4SFC2XUF.mjs → chunk-SR6S4EYG.mjs} +5 -5
  103. package/dist/cli/{chunk-UWOY74RU.js → chunk-T4G2T5DS.js} +21 -21
  104. package/dist/cli/{chunk-TN2GW57M.mjs → chunk-TMCC7ORQ.mjs} +1 -1
  105. package/dist/cli/{chunk-HEI3BWIV.mjs → chunk-TSCUWWTM.mjs} +1 -1
  106. package/dist/cli/{chunk-DBJ62RAO.js → chunk-TVW6USSG.js} +3 -3
  107. package/dist/cli/{chunk-NW4QJE54.js → chunk-U6WEGDD3.js} +2 -2
  108. package/dist/cli/{chunk-V7JCMBLU.mjs → chunk-UPHXGZCE.mjs} +4 -4
  109. package/dist/cli/{chunk-C62NI2X6.js → chunk-UQ3LQ6IF.js} +5 -5
  110. package/dist/cli/{chunk-5GOG5ZGC.mjs → chunk-VZYTLWOM.mjs} +2 -2
  111. package/dist/cli/{chunk-AF7MOUZP.mjs → chunk-W33OL4F2.mjs} +2 -2
  112. package/dist/cli/{chunk-ZM2YPJQJ.js → chunk-XK5DMLZE.js} +5 -1
  113. package/dist/cli/{chunk-LJ5747UC.mjs → chunk-XRDXNAAY.mjs} +5 -1
  114. package/dist/cli/{chunk-YGN77QA5.mjs → chunk-YDA3PMKK.mjs} +3 -3
  115. package/dist/cli/{csv-S3CHUKI6.js → csv-HFEQPGNY.js} +13 -13
  116. package/dist/cli/{csv-NLWVWD3H.mjs → csv-OHF3Y5KB.mjs} +4 -4
  117. package/dist/cli/{db-OGRPAEEM.mjs → db-M456OUXD.mjs} +7 -7
  118. package/dist/cli/{db-WBSKMMOH.js → db-VLQKCYQS.js} +28 -28
  119. package/dist/cli/describe-CP35DZ5Z.js +49 -0
  120. package/dist/cli/{describe-FAD3Z7LN.mjs → describe-M6VXFYVL.mjs} +21 -21
  121. package/dist/cli/describe-core.d.mts +3 -3
  122. package/dist/cli/describe-core.d.ts +3 -3
  123. package/dist/cli/describe-core.js +4 -4
  124. package/dist/cli/describe-core.mjs +3 -3
  125. package/dist/cli/{executions-LYCL344R.mjs → executions-4FGRBPJF.mjs} +7 -7
  126. package/dist/cli/{executions-SOAZHCY4.js → executions-GKINJZI6.js} +9 -9
  127. package/dist/cli/{feedback-AVF6V7SV.mjs → feedback-D2WMGK3V.mjs} +4 -4
  128. package/dist/cli/{feedback-OROUPUNJ.js → feedback-ZH5K7WV7.js} +8 -8
  129. package/dist/cli/git-IDALMZDN.js +25 -0
  130. package/dist/cli/{git-J5N5M57H.mjs → git-OCIJ5ME4.mjs} +5 -5
  131. package/dist/cli/index.js +142 -139
  132. package/dist/cli/index.mjs +45 -42
  133. package/dist/cli/{legacy-noops-QAQMZMEG.js → legacy-noops-QNIVP7LO.js} +8 -8
  134. package/dist/cli/{legacy-noops-ENRRM7BL.mjs → legacy-noops-V6Q2X34P.mjs} +5 -5
  135. package/dist/cli/{monitors-CKQ65WRL.mjs → monitors-2USHTG5G.mjs} +8 -8
  136. package/dist/cli/{monitors-SFMQ5LFR.js → monitors-5DNK7W2K.js} +92 -92
  137. package/dist/cli/{org-3UNTDLT2.js → org-RPGM5AN4.js} +73 -73
  138. package/dist/cli/{org-K4UIEU5P.mjs → org-TL2YPYSE.mjs} +7 -7
  139. package/dist/cli/{pages-NKZTGB4C.js → pages-PNUKPFWV.js} +18 -18
  140. package/dist/cli/{pages-6GPGBIAH.mjs → pages-XDEW6EE3.mjs} +7 -7
  141. package/dist/cli/{play-BDEADESI.js → play-F5LHRKV5.js} +858 -632
  142. package/dist/cli/{play-62BEE7IX.mjs → play-WINNQ4HZ.mjs} +372 -146
  143. package/dist/cli/{providers-SXGP44GH.js → providers-BD4IS5U5.js} +10 -10
  144. package/dist/cli/{providers-X3CUWMFP.mjs → providers-PXGL3FRE.mjs} +7 -7
  145. package/dist/cli/{quickstart-XQ4426M4.js → quickstart-7LVF6HZF.js} +6 -6
  146. package/dist/cli/{quickstart-7LN22BKX.mjs → quickstart-XTH3UQWZ.mjs} +4 -4
  147. package/dist/cli/{run-XXSN3B5A.mjs → run-MBMUENR7.mjs} +26 -26
  148. package/dist/cli/{run-PBJ4ZJ4W.js → run-NH2BAWPA.js} +41 -41
  149. package/dist/cli/{search-M75VMADD.mjs → search-BMRWBV66.mjs} +8 -8
  150. package/dist/cli/search-R3MQJQMT.js +32 -0
  151. package/dist/cli/{search-output-F6HCFYEI.js → search-output-5NNT337U.js} +22 -16
  152. package/dist/cli/{search-output-NUQAKWDM.mjs → search-output-QKKRD4MF.mjs} +14 -8
  153. package/dist/cli/{secrets-J2H6V33R.mjs → secrets-AWEXBTJV.mjs} +7 -7
  154. package/dist/cli/{secrets-LRYY4QPE.js → secrets-KQSTOREN.js} +16 -16
  155. package/dist/cli/{sessions-YPF62CZE.js → sessions-DSPLZYCJ.js} +6 -6
  156. package/dist/cli/{sessions-IMT336UV.mjs → sessions-RO25Q67X.mjs} +5 -5
  157. package/dist/cli/{settings-35YYC5WA.js → settings-7JXIKNKI.js} +79 -79
  158. package/dist/cli/{settings-PDWVQIGH.mjs → settings-JMGXGK4Z.mjs} +12 -12
  159. package/dist/cli/{setup-UR7GOR7H.js → setup-5QFAQQRW.js} +47 -47
  160. package/dist/cli/{setup-DG5DISSE.mjs → setup-ZQZ47FHB.mjs} +9 -9
  161. package/dist/cli/skills-EDZXY7DV.js +33 -0
  162. package/dist/cli/{skills-U6NJD5J7.mjs → skills-W3H2DL56.mjs} +7 -7
  163. package/dist/cli/{tools-2HGEOELR.mjs → tools-2BZCVNBS.mjs} +19 -19
  164. package/dist/cli/tools-2EY2ETCZ.js +56 -0
  165. package/dist/cli/{update-FRAYBAHK.mjs → update-GAWYMGAW.mjs} +9 -9
  166. package/dist/cli/update-UKDQKNBY.js +33 -0
  167. package/dist/cli/{workflow-DDKVTF36.mjs → workflow-M6LLHQ2I.mjs} +8 -8
  168. package/dist/cli/{workflow-JKKLOMBX.js → workflow-ZPTDFPKW.js} +18 -18
  169. package/dist/{client-DJ3r8VQJ.d.mts → client-BkbDHRIg.d.mts} +1 -1
  170. package/dist/{client-JPSNljtj.d.ts → client-D3hVHXjK.d.ts} +1 -1
  171. package/dist/{client-core-3SJlNsKU.d.mts → client-core-BZoSMKcY.d.mts} +30 -15
  172. package/dist/{client-core-rCoQ5Xz3.d.ts → client-core-DUdVqO_m.d.ts} +30 -15
  173. package/dist/{compiler-manifest-gkO9ZkVg.d.mts → compiler-manifest-BFTwq1HI.d.mts} +1 -1
  174. package/dist/{compiler-manifest-gkO9ZkVg.d.ts → compiler-manifest-BFTwq1HI.d.ts} +1 -1
  175. package/dist/{errors-Cc92LKH-.d.ts → errors-c3pMsylw.d.ts} +1 -1
  176. package/dist/{errors-CeCCOKSA.d.mts → errors-w31ybrQM.d.mts} +1 -1
  177. package/dist/{index-DJQKdV76.d.ts → index-CQ-15-QL.d.ts} +1 -1
  178. package/dist/{index-DsqWJL3Q.d.mts → index-DvNtxucX.d.mts} +1 -1
  179. package/dist/index.d.mts +7 -7
  180. package/dist/index.d.ts +7 -7
  181. package/dist/index.js +10 -10
  182. package/dist/index.mjs +7 -7
  183. package/dist/install-integrity.json +117 -116
  184. package/dist/plays/bundle-play-file.d.mts +3 -3
  185. package/dist/plays/bundle-play-file.d.ts +3 -3
  186. package/dist/plays/bundle-play-file.mjs +2 -2
  187. package/dist/plays/play-description.d.mts +2 -2
  188. package/dist/plays/play-description.d.ts +2 -2
  189. package/dist/plays/run-request.d.mts +2 -2
  190. package/dist/plays/run-request.d.ts +2 -2
  191. package/dist/plays/run-request.js +12 -2
  192. package/dist/plays/run-request.mjs +11 -1
  193. package/dist/release.d.mts +1 -1
  194. package/dist/release.d.ts +1 -1
  195. package/dist/release.js +2 -2
  196. package/dist/release.mjs +1 -1
  197. package/dist/server.d.mts +4 -4
  198. package/dist/server.d.ts +4 -4
  199. package/dist/server.js +6 -6
  200. package/dist/server.mjs +4 -4
  201. package/package.json +1 -1
  202. package/dist/cli/auth-L5CSV3UO.js +0 -43
  203. package/dist/cli/chunk-KA2LNIUP.js +0 -33
  204. package/dist/cli/describe-UIAYCHWW.js +0 -49
  205. package/dist/cli/git-ATMWC27D.js +0 -25
  206. package/dist/cli/search-IGHLRLBD.js +0 -32
  207. package/dist/cli/skills-4U5WC4MJ.js +0 -33
  208. package/dist/cli/tools-PYJTQVVS.js +0 -56
  209. package/dist/cli/update-344OTRFM.js +0 -33
@@ -5,8 +5,10 @@ import {
5
5
  providerMetaFromToolResponseRawV2
6
6
  } from "./chunk-L2VKAASU.mjs";
7
7
  import {
8
+ CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH,
8
9
  CLI_PLAY_RUN_START_STREAM_PATH,
9
10
  CLI_PLAY_RUN_SUPPORTED_HEADER,
11
+ CliPlayAdmissionCallerIntentV2UnsupportedError,
10
12
  CliPlayAdmissionUnsupportedError,
11
13
  PLAY_RUN_START_STREAM_PATH,
12
14
  decodePlayRunPublicStatus,
@@ -16,8 +18,9 @@ import {
16
18
  preparePlayRunAdmission,
17
19
  readPlayRunAdmissionCapability,
18
20
  stagePlayFiles,
19
- startPlayRun
20
- } from "./chunk-HNRELVCS.mjs";
21
+ startPlayRun,
22
+ submitPreparedPlayRunAdmission
23
+ } from "./chunk-ONONSV2Q.mjs";
21
24
  import {
22
25
  describePlayDetail,
23
26
  describePlayListItem
@@ -28,7 +31,7 @@ import {
28
31
  RETAINED_PIPELINE_RECEIVERS_HEADER,
29
32
  RUNTIME_ENVIRONMENT_TOKEN_HEADER,
30
33
  SDK_API_MAJOR
31
- } from "./chunk-WYUCDLVR.mjs";
34
+ } from "./chunk-GHHJWCMD.mjs";
32
35
  import {
33
36
  CustomerDbQueryOutcomeUnknownError
34
37
  } from "./chunk-4QF2K7TM.mjs";
@@ -1114,7 +1117,8 @@ var PlayClient = class {
1114
1117
  }
1115
1118
  const query = params.size > 0 ? `?${params.toString()}` : "";
1116
1119
  const response = await this.http.get(
1117
- `/api/v2/runs/${encodeURIComponent(workflowId)}${query}`
1120
+ `/api/v2/runs/${encodeURIComponent(workflowId)}${query}`,
1121
+ options?.runStatus === true ? { headers: { "x-deepline-run-status": "1" } } : void 0
1118
1122
  );
1119
1123
  return normalizePlayStatus(response);
1120
1124
  }
@@ -1308,7 +1312,7 @@ function classifyLegacyLogLine(line) {
1308
1312
  if (/^\[perf\] runtime receipt\b/i.test(message)) {
1309
1313
  return "receipt";
1310
1314
  }
1311
- if (/^\[perf\]/i.test(message) || /^\[runtime\.(?:phase_summary|logs|log_transport)\]/i.test(message) || /\[worker\] picked up run\b/.test(message) || /\[worker\] heartbeat\b/.test(message) || /\[worker\] progress completedRows=\d+ totalRows=\d+ rowUpdates=\d+/.test(
1315
+ if (/^\[perf-trace\]/i.test(message) || /^\[perf\]/i.test(message) || /^\[runtime\.(?:phase_summary|logs|log_transport)\]/i.test(message) || /\[worker\] picked up run\b/.test(message) || /\[worker\] heartbeat\b/.test(message) || /\[worker\] progress completedRows=\d+ totalRows=\d+ rowUpdates=\d+/.test(
1312
1316
  message
1313
1317
  ) || /\[worker\] step started\b/.test(message) || /\[worker\] Preparing run files\b/.test(message) || /\[worker\] Run files ready\b/.test(message) || /\[worker\] Runtime ready\b/.test(message) || /\[worker\] Sandbox (?:starting|create start|create done|workspace ready|upload start|runner uploaded)\b/.test(
1314
1318
  message
@@ -2896,8 +2900,9 @@ function diffPlayRunStreamEvents(input) {
2896
2900
 
2897
2901
  // src/runs/watch-polling.ts
2898
2902
  var RUN_WATCH_POLL_INTERVAL_MS = 2e3;
2899
- var RUN_WATCH_STARTUP_POLL_INTERVAL_MS = 500;
2903
+ var RUN_WATCH_STARTUP_POLL_INTERVAL_MS = 300;
2900
2904
  var RUN_WATCH_STARTUP_WINDOW_MS = 6e3;
2905
+ var TERMINAL_LOG_PROJECTION_RETRY_LIMIT = 3;
2901
2906
  function waitForNextPoll(ms, signal) {
2902
2907
  if (signal?.aborted) {
2903
2908
  return Promise.resolve(false);
@@ -2990,6 +2995,7 @@ async function* watchRunEvents(options) {
2990
2995
  let consecutiveFailures = 0;
2991
2996
  let outageNoticeSent = false;
2992
2997
  let pollCount = 0;
2998
+ let terminalLogProjectionRetries = 0;
2993
2999
  while (!signal?.aborted) {
2994
3000
  const pollStartedAt = Date.now();
2995
3001
  const poll = ++pollCount;
@@ -3067,6 +3073,23 @@ async function* watchRunEvents(options) {
3067
3073
  outageNoticeSent = false;
3068
3074
  }
3069
3075
  consecutiveFailures = 0;
3076
+ const terminalLogsPending = isTerminalPlayRunLiveStatus(snapshot.status) && snapshot.logsUnavailable && !options.omitTerminalLogs;
3077
+ if (terminalLogsPending) {
3078
+ if (terminalLogProjectionRetries < TERMINAL_LOG_PROJECTION_RETRY_LIMIT) {
3079
+ terminalLogProjectionRetries += 1;
3080
+ const remaining2 = Math.max(
3081
+ 0,
3082
+ pollIntervalMs - (Date.now() - pollStartedAt)
3083
+ );
3084
+ if (!await waitForNextPoll(remaining2, signal)) return;
3085
+ continue;
3086
+ }
3087
+ options.onNotice?.(
3088
+ `[watch] terminal status is complete, but final logs are unavailable in this watch; fetch retained logs with deepline runs logs ${runId}`
3089
+ );
3090
+ } else {
3091
+ terminalLogProjectionRetries = 0;
3092
+ }
3070
3093
  if (terminalStatus) {
3071
3094
  await options.terminalStatus?.onStatus(terminalStatus, snapshot.status);
3072
3095
  }
@@ -3969,17 +3992,22 @@ var DeeplineClient = class _DeeplineClient {
3969
3992
  this.http,
3970
3993
  resolved.request,
3971
3994
  options?.onSubmission,
3972
- {
3973
- ...options && Object.hasOwn(options, "admissionCapability") ? { admissionCapability: options.admissionCapability } : {}
3974
- }
3995
+ options
3975
3996
  );
3976
3997
  const bodyJson = JSON.stringify(prepared.body);
3977
- const headers = runtimeSelectionHeaders(resolved.runtime, this.environment);
3998
+ const runtimeHeaders = runtimeSelectionHeaders(
3999
+ resolved.runtime,
4000
+ this.environment
4001
+ );
4002
+ const headers = options?.cliAdmission ? {
4003
+ ...runtimeHeaders,
4004
+ "X-Deepline-API-Major": String(SDK_API_MAJOR)
4005
+ } : runtimeHeaders;
3978
4006
  const http = this.http;
3979
4007
  let submitted = false;
3980
4008
  return {
3981
4009
  ...prepared,
3982
- async *startStream(streamOptions) {
4010
+ async start(startOptions) {
3983
4011
  if (submitted && !prepared.supportsCallerIntent) {
3984
4012
  throw new DeeplineError(
3985
4013
  "This server has not enabled caller-owned admission recovery. Do not retry an ambiguous start.",
@@ -3988,15 +4016,56 @@ var DeeplineClient = class _DeeplineClient {
3988
4016
  );
3989
4017
  }
3990
4018
  if (submitted) {
3991
- await preparePlayRunAdmission(
4019
+ if (!options?.callerIntentV2) {
4020
+ await preparePlayRunAdmission(
4021
+ http,
4022
+ JSON.parse(bodyJson),
4023
+ void 0,
4024
+ { signal: startOptions?.signal ?? options?.signal }
4025
+ );
4026
+ }
4027
+ }
4028
+ submitted = true;
4029
+ try {
4030
+ return await submitPreparedPlayRunAdmission(
3992
4031
  http,
3993
4032
  JSON.parse(bodyJson),
3994
- void 0,
3995
- { signal: streamOptions?.signal }
4033
+ prepared.workflowId,
4034
+ prepared.supportsCallerIntent,
4035
+ headers,
4036
+ {
4037
+ cliAdmission: startOptions?.cliAdmission ?? options?.cliAdmission,
4038
+ callerIntentV2: options?.callerIntentV2,
4039
+ signal: startOptions?.signal ?? options?.signal
4040
+ }
4041
+ );
4042
+ } catch (error) {
4043
+ if (error instanceof CliPlayAdmissionUnsupportedError || error instanceof CliPlayAdmissionCallerIntentV2UnsupportedError) {
4044
+ submitted = false;
4045
+ }
4046
+ throw error;
4047
+ }
4048
+ },
4049
+ async *startStream(streamOptions) {
4050
+ if (submitted && !prepared.supportsCallerIntent) {
4051
+ throw new DeeplineError(
4052
+ "This server has not enabled caller-owned admission recovery. Do not retry an ambiguous start.",
4053
+ 409,
4054
+ "PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
3996
4055
  );
3997
4056
  }
4057
+ if (submitted) {
4058
+ if (!options?.callerIntentV2) {
4059
+ await preparePlayRunAdmission(
4060
+ http,
4061
+ JSON.parse(bodyJson),
4062
+ void 0,
4063
+ { signal: streamOptions?.signal }
4064
+ );
4065
+ }
4066
+ }
3998
4067
  submitted = true;
3999
- const streamPath = options?.cliAdmission ? CLI_PLAY_RUN_START_STREAM_PATH : PLAY_RUN_START_STREAM_PATH;
4068
+ const streamPath = options?.callerIntentV2 ? CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH : options?.cliAdmission ? CLI_PLAY_RUN_START_STREAM_PATH : PLAY_RUN_START_STREAM_PATH;
4000
4069
  let cliAdmissionSupported = false;
4001
4070
  try {
4002
4071
  for await (const event of http.streamSse(streamPath, {
@@ -4015,6 +4084,13 @@ var DeeplineClient = class _DeeplineClient {
4015
4084
  }
4016
4085
  } catch (error) {
4017
4086
  if (options?.cliAdmission && !cliAdmissionSupported && error instanceof DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
4087
+ if (options.callerIntentV2) {
4088
+ submitted = false;
4089
+ throw new CliPlayAdmissionCallerIntentV2UnsupportedError(
4090
+ error.statusCode
4091
+ );
4092
+ }
4093
+ submitted = false;
4018
4094
  throw new CliPlayAdmissionUnsupportedError(error.statusCode);
4019
4095
  }
4020
4096
  throw error;
@@ -4027,8 +4103,8 @@ var DeeplineClient = class _DeeplineClient {
4027
4103
  * preparation so the network round trip can overlap with compilation.
4028
4104
  * @internal
4029
4105
  */
4030
- async prefetchPlayRunAdmissionCapability() {
4031
- return readPlayRunAdmissionCapability(this.http);
4106
+ async prefetchPlayRunAdmissionCapability(options) {
4107
+ return readPlayRunAdmissionCapability(this.http, options);
4032
4108
  }
4033
4109
  /**
4034
4110
  * Submit a play run through the legacy event response.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HttpClient,
3
3
  detectAgentRuntime
4
- } from "./chunk-WYUCDLVR.mjs";
4
+ } from "./chunk-GHHJWCMD.mjs";
5
5
  import {
6
6
  ConfigError
7
7
  } from "./chunk-4QF2K7TM.mjs";
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-HBL4PM5Q.mjs";
17
17
  import {
18
18
  SDK_RELEASE
19
- } from "./chunk-HEI3BWIV.mjs";
19
+ } from "./chunk-TSCUWWTM.mjs";
20
20
 
21
21
  // src/version.ts
22
22
  var SDK_VERSION = SDK_RELEASE.version;
@@ -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
+ import { createHash } from "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;
@@ -49,7 +49,7 @@ 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.484",
52
+ version: "0.3.485",
53
53
  updateSummary: {
54
54
  introducedIn: "0.3.90",
55
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."
@@ -1,16 +1,16 @@
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; }
2
2
 
3
- var _chunkFRD5WFT4js = require('./chunk-FRD5WFT4.js');
3
+ var _chunk775AZTO7js = require('./chunk-775AZTO7.js');
4
4
 
5
5
 
6
6
 
7
- var _chunk3XQIVEATjs = require('./chunk-3XQIVEAT.js');
7
+ var _chunkS3WQJ5VGjs = require('./chunk-S3WQJ5VG.js');
8
8
 
9
9
  // src/client.ts
10
- var DeeplineClient2 = class extends _chunkFRD5WFT4js.DeeplineClient {
10
+ var DeeplineClient2 = class extends _chunk775AZTO7js.DeeplineClient {
11
11
  constructor(options) {
12
- const config = _chunk3XQIVEATjs.resolveConfig.call(void 0, options);
13
- super(config, new (0, _chunk3XQIVEATjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
12
+ const config = _chunkS3WQJ5VGjs.resolveConfig.call(void 0, options);
13
+ super(config, new (0, _chunkS3WQJ5VGjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
14
14
  }
15
15
  };
16
16
 
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  Capability,
8
8
  observedMaxText
9
- } from "./chunk-LJ5747UC.mjs";
9
+ } from "./chunk-XRDXNAAY.mjs";
10
10
  import {
11
11
  playToolListGetterMode
12
12
  } from "./chunk-FR2ILQ4G.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  formatModelDescription,
4
4
  publicToolSchemas,
5
5
  toolMetadataJsonForDescribe
6
- } from "./chunk-SD7QWZTV.mjs";
6
+ } from "./chunk-INW22YP7.mjs";
7
7
  import {
8
8
  buildPlayDashboardUrl,
9
9
  byokLines,
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  csvSafeJsonString,
8
8
  csvStringFromRows
9
- } from "./chunk-7K5CWKKZ.mjs";
9
+ } from "./chunk-L352NOE3.mjs";
10
10
 
11
11
  // src/cli/describe-options.ts
12
12
  function addDescribeOptions(command, options = {}) {
@@ -1,23 +1,23 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkQIDDTIVZjs = require('./chunk-QIDDTIVZ.js');
3
+ var _chunk3OF7NSGRjs = require('./chunk-3OF7NSGR.js');
4
4
 
5
5
 
6
- var _chunkDBJ62RAOjs = require('./chunk-DBJ62RAO.js');
6
+ var _chunkTVW6USSGjs = require('./chunk-TVW6USSG.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
- var _chunkAK7UKQ5Rjs = require('./chunk-AK7UKQ5R.js');
11
+ var _chunkCSBMKHTVjs = require('./chunk-CSBMKHTV.js');
12
12
 
13
13
 
14
14
  var _chunkIAYSWZDJjs = require('./chunk-IAYSWZDJ.js');
15
15
 
16
16
 
17
- var _chunk2AWYJXBXjs = require('./chunk-2AWYJXBX.js');
17
+ var _chunkIHMYIHF4js = require('./chunk-IHMYIHF4.js');
18
18
 
19
19
 
20
- var _chunkU7IJAGWBjs = require('./chunk-U7IJAGWB.js');
20
+ var _chunkBSKPQB2Pjs = require('./chunk-BSKPQB2P.js');
21
21
 
22
22
  // src/cli/commands/describe.ts
23
23
  var _fs = require('fs');
@@ -26,16 +26,16 @@ function nothingNamed(name) {
26
26
  return `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`;
27
27
  }
28
28
  function findNamed2(name, options) {
29
- return _chunkAK7UKQ5Rjs.findNamed.call(void 0, name, options, _chunkAK7UKQ5Rjs.describeLookupsFor.call(void 0, new (0, _chunk2AWYJXBXjs.DeeplineClient)()));
29
+ return _chunkCSBMKHTVjs.findNamed.call(void 0, name, options, _chunkCSBMKHTVjs.describeLookupsFor.call(void 0, new (0, _chunkIHMYIHF4js.DeeplineClient)()));
30
30
  }
31
31
  async function describeAnything(name, options, onMissing) {
32
- const client = new (0, _chunk2AWYJXBXjs.DeeplineClient)();
33
- const lookups = _chunkAK7UKQ5Rjs.describeLookupsFor.call(void 0, client);
34
- const outcome = await _chunkAK7UKQ5Rjs.describeName.call(void 0, name, options, {
32
+ const client = new (0, _chunkIHMYIHF4js.DeeplineClient)();
33
+ const lookups = _chunkCSBMKHTVjs.describeLookupsFor.call(void 0, client);
34
+ const outcome = await _chunkCSBMKHTVjs.describeName.call(void 0, name, options, {
35
35
  ...lookups,
36
36
  // `tools describe` has already fetched the tool for its compatibility check.
37
37
  tool: async (toolName) => _nullishCoalesce(options.fetchedTool, () => ( lookups.tool(toolName))),
38
- seedStarterScript: _chunkQIDDTIVZjs.seedToolListScript
38
+ seedStarterScript: _chunk3OF7NSGRjs.seedToolListScript
39
39
  });
40
40
  if (outcome.status === "missing") {
41
41
  if (onMissing) return onMissing();
@@ -60,18 +60,18 @@ function deliver(envelope, lines, { json, out }) {
60
60
  ` : text;
61
61
  _fs.writeFileSync.call(void 0, path, content);
62
62
  const bytes = Buffer.byteLength(content);
63
- _chunkU7IJAGWBjs.printCommandEnvelope.call(void 0,
63
+ _chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0,
64
64
  { path, bytes },
65
65
  { json, text: `Wrote ${path} (${bytes} bytes)
66
66
  ` }
67
67
  );
68
68
  return 0;
69
69
  }
70
- _chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, envelope, { json, text });
70
+ _chunkBSKPQB2Pjs.printCommandEnvelope.call(void 0, envelope, { json, text });
71
71
  return 0;
72
72
  }
73
73
  function registerDescribeCommand(program) {
74
- _chunkDBJ62RAOjs.addDescribeOptions.call(void 0, program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
74
+ _chunkTVW6USSGjs.addDescribeOptions.call(void 0, program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
75
75
  "Describe anything search returns: a tool, monitor type, or play."
76
76
  ).addHelpText(
77
77
  "after",
@@ -2,10 +2,10 @@ import {
2
2
  getAuthedHttpClient,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-7K5CWKKZ.mjs";
5
+ } from "./chunk-L352NOE3.mjs";
6
6
  import {
7
7
  resolveBaseUrlOnly
8
- } from "./chunk-TRLDJNVE.mjs";
8
+ } from "./chunk-G5PI3RNT.mjs";
9
9
 
10
10
  // src/cli/commands/git.ts
11
11
  function shellQuote(value) {
@@ -2,10 +2,10 @@ import {
2
2
  HttpClient,
3
3
  resolveCliCommandContext,
4
4
  resolveConfig
5
- } from "./chunk-TRLDJNVE.mjs";
5
+ } from "./chunk-G5PI3RNT.mjs";
6
6
  import {
7
7
  detectAgentRuntime
8
- } from "./chunk-WYUCDLVR.mjs";
8
+ } from "./chunk-GHHJWCMD.mjs";
9
9
  import {
10
10
  DeeplineError,
11
11
  serializeToolExecutionFailure