deepline 0.3.491 → 0.3.493

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 (184) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +11 -5
  2. package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -0
  3. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  4. package/dist/bundling-sources/sdk/src/types.ts +6 -0
  5. package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +25 -9
  6. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
  7. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  8. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +54 -0
  9. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +5 -4
  10. package/dist/bundling-sources/shared_libs/play-runtime/crustdata-company-identify-batching.ts +162 -0
  11. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-reaper.ts +19 -3
  12. package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +5 -3
  13. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +2 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/receipt-sql.ts +17 -23
  15. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +28 -1
  16. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +293 -110
  17. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-placement-policy.ts +75 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +20 -0
  19. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +412 -59
  20. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +38 -10
  21. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +19 -11
  22. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-operation.ts +165 -12
  23. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-state-machine.ts +358 -0
  24. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +104 -2
  25. package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +7 -2
  26. package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +4 -0
  27. package/dist/bundling-sources/shared_libs/product-notifications/content.ts +13 -0
  28. package/dist/bundling-sources/shared_libs/product-notifications/email.ts +49 -10
  29. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +22 -0
  30. package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +6 -1
  31. package/dist/cli/{auth-FXAC472Y.mjs → auth-3NAY3AST.mjs} +5 -5
  32. package/dist/cli/auth-KYQLDI6V.js +43 -0
  33. package/dist/cli/{billing-PDOA3KZ3.js → billing-FSB4BBBO.js} +80 -80
  34. package/dist/cli/{billing-UM4LE33K.mjs → billing-SBWQCC7B.mjs} +7 -7
  35. package/dist/cli/{chunk-HSJK6EMU.mjs → chunk-2BRTYIAH.mjs} +23 -9
  36. package/dist/cli/{chunk-B2TXKEED.js → chunk-2H4OFVR5.js} +5 -5
  37. package/dist/cli/{chunk-BCKIBVEJ.js → chunk-2I7VN65H.js} +10 -10
  38. package/dist/cli/{chunk-LMG7O6XJ.mjs → chunk-2IHGVAGT.mjs} +2 -2
  39. package/dist/cli/{chunk-5KMGKG4B.js → chunk-2NGIBJM2.js} +8 -8
  40. package/dist/cli/{chunk-2MW6TGNZ.mjs → chunk-3QGUWB6E.mjs} +4 -4
  41. package/dist/cli/{chunk-ORKLMANE.mjs → chunk-4IJFQV3O.mjs} +1 -1
  42. package/dist/cli/{chunk-PIPEPCRL.mjs → chunk-4NIGNT7X.mjs} +1 -1
  43. package/dist/cli/{chunk-H6UIS36S.mjs → chunk-5DIZ2G74.mjs} +2 -2
  44. package/dist/cli/{chunk-TKLDKIJU.mjs → chunk-5JPKRDFC.mjs} +7 -5
  45. package/dist/cli/{chunk-FTXIJTV2.mjs → chunk-5WOPBX3H.mjs} +1 -1
  46. package/dist/cli/{chunk-KGJVDR4Q.mjs → chunk-67ZG7XZV.mjs} +3 -3
  47. package/dist/cli/{chunk-DUFRH43S.js → chunk-7HABWOMB.js} +261 -261
  48. package/dist/cli/{chunk-MN6DCV63.js → chunk-AGTXL6LZ.js} +5 -5
  49. package/dist/cli/{chunk-Q7G7CU4W.js → chunk-AWMCZAUR.js} +3 -3
  50. package/dist/cli/{chunk-HHTVRICE.js → chunk-C2MRDPA5.js} +17 -17
  51. package/dist/cli/{chunk-ONONSV2Q.mjs → chunk-DVQHG6AM.mjs} +1 -0
  52. package/dist/cli/{chunk-O3K22ZC7.js → chunk-DWJ4RXSA.js} +34 -11
  53. package/dist/cli/{chunk-MAM6ZOVS.mjs → chunk-DYP27IWC.mjs} +99 -24
  54. package/dist/cli/{chunk-NUOKAKZW.mjs → chunk-E5ILCMKQ.mjs} +1 -1
  55. package/dist/cli/{chunk-OLHWZM4A.mjs → chunk-EBAS3UT2.mjs} +6 -6
  56. package/dist/cli/{chunk-74H5OTRM.js → chunk-EFO5GVYS.js} +1 -1
  57. package/dist/cli/{chunk-X7YOVJBC.js → chunk-EYG336YV.js} +132 -57
  58. package/dist/cli/{chunk-YV4DP6KQ.mjs → chunk-GSC35TPZ.mjs} +2 -2
  59. package/dist/cli/{chunk-EPD7NSDJ.mjs → chunk-HLM2UFQ5.mjs} +13 -5
  60. package/dist/cli/{chunk-IG3GSBBE.js → chunk-HTUSTPP4.js} +32 -32
  61. package/dist/cli/{chunk-CFPFTS3A.mjs → chunk-IJJ6D5WL.mjs} +12 -12
  62. package/dist/cli/{chunk-TH7JLR5D.js → chunk-IJOHWGPF.js} +6 -6
  63. package/dist/cli/{chunk-RFSXXDH7.js → chunk-IOBPR2VO.js} +17 -17
  64. package/dist/cli/{chunk-HNG2U3IG.js → chunk-IOMEJKGK.js} +2 -2
  65. package/dist/cli/{chunk-A7ZMG2QZ.mjs → chunk-IRDYBMA7.mjs} +34 -11
  66. package/dist/cli/{chunk-ZEZ3CZ3X.js → chunk-JO2JZUBR.js} +3 -3
  67. package/dist/cli/{chunk-4IP5MLWU.js → chunk-JO5FFSR7.js} +6 -1
  68. package/dist/cli/{chunk-SJOHQ2WW.js → chunk-KCDZWS2B.js} +56 -56
  69. package/dist/cli/{chunk-CGDUFVNE.mjs → chunk-KGDDQMI7.mjs} +2 -2
  70. package/dist/cli/{chunk-OYJTLEB4.mjs → chunk-KKSKYZO4.mjs} +1 -1
  71. package/dist/cli/{chunk-TMAS3WH3.js → chunk-LGTZYI5B.js} +21 -21
  72. package/dist/cli/{chunk-SUMKWA53.js → chunk-MLEUOTEQ.js} +73 -59
  73. package/dist/cli/{chunk-3WRWPNHE.mjs → chunk-NALJJTPS.mjs} +5 -5
  74. package/dist/cli/{chunk-27MRSV6O.js → chunk-NPNAEPY4.js} +26 -26
  75. package/dist/cli/{chunk-AEKJZJ4R.js → chunk-NWIDPT7H.js} +4 -4
  76. package/dist/cli/{chunk-AUQQVDAB.js → chunk-PKV5CD3W.js} +1 -0
  77. package/dist/cli/{chunk-3FMU6F6E.js → chunk-QTPS5RLG.js} +15 -15
  78. package/dist/cli/{chunk-4OLXMJ2L.js → chunk-RLX5ZFNX.js} +8 -6
  79. package/dist/cli/{chunk-DEJIN4DF.mjs → chunk-SAW3FBCA.mjs} +5 -0
  80. package/dist/cli/{chunk-S4CYM4EC.mjs → chunk-SXD2EYAH.mjs} +6 -6
  81. package/dist/cli/{chunk-YNWET57Z.js → chunk-TIFRRLZT.js} +7 -7
  82. package/dist/cli/{chunk-6PMM7VJN.mjs → chunk-TNQOR6XQ.mjs} +1 -1
  83. package/dist/cli/{chunk-6UARNRXT.js → chunk-UCMY2SO2.js} +23 -15
  84. package/dist/cli/{chunk-X75ONMDJ.mjs → chunk-VFHIYWMC.mjs} +5 -5
  85. package/dist/cli/{chunk-ZX2FXZJN.js → chunk-WCZFCOMZ.js} +7 -7
  86. package/dist/cli/{chunk-IIO7UOVW.mjs → chunk-WTFI7BVH.mjs} +3 -3
  87. package/dist/cli/{chunk-I64PYCTB.js → chunk-XLE7KXE7.js} +2 -2
  88. package/dist/cli/{chunk-CRBBGKRH.js → chunk-XQX476QK.js} +14 -14
  89. package/dist/cli/{chunk-WCWVXN3R.mjs → chunk-Y3NN2UAF.mjs} +2 -2
  90. package/dist/cli/{chunk-3K4IAV7I.mjs → chunk-ZQH4TXM2.mjs} +2 -2
  91. package/dist/cli/{chunk-VC3SH4QW.mjs → chunk-ZVW7EWTC.mjs} +7 -7
  92. package/dist/cli/{chunk-QBOE5LEH.mjs → chunk-ZVXB7OU7.mjs} +1 -1
  93. package/dist/cli/command-docs.js +2 -2
  94. package/dist/cli/command-docs.mjs +1 -1
  95. package/dist/cli/{csv-IGPAPAES.js → csv-DKYZE2KM.js} +13 -13
  96. package/dist/cli/{csv-RNMQHECI.mjs → csv-XR22YQXT.mjs} +4 -4
  97. package/dist/cli/{db-CKMVVGXJ.mjs → db-EOKG36YN.mjs} +7 -7
  98. package/dist/cli/{db-32OXM3TO.js → db-RNYRTCMV.js} +28 -28
  99. package/dist/cli/describe-ICFXOQBW.mjs +50 -0
  100. package/dist/cli/describe-RS75I33X.js +50 -0
  101. package/dist/cli/describe-core.d.mts +2 -2
  102. package/dist/cli/describe-core.d.ts +2 -2
  103. package/dist/cli/describe-core.js +4 -4
  104. package/dist/cli/describe-core.mjs +3 -3
  105. package/dist/cli/{executions-S4M4JMCU.mjs → executions-3RAOACNS.mjs} +7 -7
  106. package/dist/cli/{executions-PCZS7B2M.js → executions-OBWPSWH7.js} +9 -9
  107. package/dist/cli/{feedback-FGUJVCBS.mjs → feedback-6EQRVBKF.mjs} +4 -4
  108. package/dist/cli/{feedback-6EGKPZ3U.js → feedback-6GPEUBLF.js} +8 -8
  109. package/dist/cli/getting-started.d.mts +12 -10
  110. package/dist/cli/getting-started.d.ts +12 -10
  111. package/dist/cli/getting-started.js +4 -2
  112. package/dist/cli/getting-started.mjs +3 -1
  113. package/dist/cli/{git-LR4ARG5H.mjs → git-CVQ24DTR.mjs} +5 -5
  114. package/dist/cli/git-DEFE4SSB.js +25 -0
  115. package/dist/cli/index.js +143 -143
  116. package/dist/cli/index.mjs +43 -43
  117. package/dist/cli/{legacy-noops-S37PJ7OJ.mjs → legacy-noops-QULJZYNH.mjs} +5 -5
  118. package/dist/cli/{legacy-noops-VX4JEQR6.js → legacy-noops-XPOATG5V.js} +8 -8
  119. package/dist/cli/{monitors-H3AX6CZG.mjs → monitors-AFT5YJPZ.mjs} +49 -9
  120. package/dist/cli/{monitors-ADASJI72.js → monitors-OJ4CMREE.js} +169 -129
  121. package/dist/cli/{org-ZRJ3C56J.js → org-RKT52CSL.js} +73 -73
  122. package/dist/cli/{org-D3F5LUDW.mjs → org-WHKNXANG.mjs} +7 -7
  123. package/dist/cli/{pages-PSHU366M.mjs → pages-EEAQFGVD.mjs} +7 -7
  124. package/dist/cli/{pages-5TKO3644.js → pages-SOE3R667.js} +18 -18
  125. package/dist/cli/{play-AUDDK7XB.mjs → play-LXFWHUBP.mjs} +147 -52
  126. package/dist/cli/{play-VDAETQDI.js → play-OTJJ4E4T.js} +661 -566
  127. package/dist/cli/{providers-IURPWRWD.js → providers-RU4HIAT3.js} +10 -10
  128. package/dist/cli/{providers-X7YMZSKQ.mjs → providers-U3CPKTMM.mjs} +7 -7
  129. package/dist/cli/{quickstart-6AGWVFNX.mjs → quickstart-75AO2AJC.mjs} +5 -5
  130. package/dist/cli/{quickstart-Y6GFXLDV.js → quickstart-N72IVA2Y.js} +13 -13
  131. package/dist/cli/{run-TG7J45NS.mjs → run-IGWFL6WH.mjs} +29 -28
  132. package/dist/cli/{run-TQFGOXNT.js → run-MMYES3IW.js} +44 -43
  133. package/dist/cli/search-EQURI7SZ.js +32 -0
  134. package/dist/cli/{search-3G4J2GC6.mjs → search-FIYESBLZ.mjs} +8 -8
  135. package/dist/cli/{search-output-NPZICK5C.js → search-output-2FXN4ZWD.js} +9 -6
  136. package/dist/cli/{search-output-ZGNHDCLL.mjs → search-output-3I5KSW36.mjs} +7 -4
  137. package/dist/cli/{secrets-KTTHT4ZG.js → secrets-HCZQ6JNP.js} +16 -16
  138. package/dist/cli/{secrets-EAWJBRUD.mjs → secrets-O7IUQ3VT.mjs} +7 -7
  139. package/dist/cli/{sessions-S4YVBPAW.js → sessions-5AYTT4IW.js} +6 -6
  140. package/dist/cli/{sessions-D4Q3LCEQ.mjs → sessions-KY7A3EZO.mjs} +5 -5
  141. package/dist/cli/{settings-BAK3VOWW.js → settings-P4VFYWJK.js} +80 -80
  142. package/dist/cli/{settings-JUORW6NL.mjs → settings-WSMRR2GS.mjs} +13 -13
  143. package/dist/cli/{setup-NJPHTW32.js → setup-J7CA3EJL.js} +57 -57
  144. package/dist/cli/{setup-AXFGCXJE.mjs → setup-YTVKVQC7.mjs} +13 -13
  145. package/dist/cli/skills-KKPEGLAR.js +36 -0
  146. package/dist/cli/{skills-SKJVDJEF.mjs → skills-W5WY764N.mjs} +10 -10
  147. package/dist/cli/tools-65Y4QTW6.js +57 -0
  148. package/dist/cli/{tools-63THJVJZ.mjs → tools-YECI6N3N.mjs} +20 -20
  149. package/dist/cli/{update-KSID5F74.mjs → update-BIFBIEII.mjs} +10 -10
  150. package/dist/cli/update-WDG7VFOW.js +34 -0
  151. package/dist/cli/{workflow-BLSMWBKW.js → workflow-D2TUFFH6.js} +18 -18
  152. package/dist/cli/{workflow-C4B54X2Z.mjs → workflow-XZVDNARC.mjs} +8 -8
  153. package/dist/{client-CQgGFxAH.d.ts → client-BDB_VbE4.d.ts} +1 -1
  154. package/dist/{client-B4R1scm2.d.mts → client-CNzJ1LTF.d.mts} +1 -1
  155. package/dist/{client-core-DMvHWjub.d.mts → client-core-CSv3DlPD.d.mts} +76 -5
  156. package/dist/{client-core-BUNjKBKq.d.ts → client-core-xEa9x3pl.d.ts} +76 -5
  157. package/dist/index.d.mts +3 -3
  158. package/dist/index.d.ts +3 -3
  159. package/dist/index.js +10 -10
  160. package/dist/index.mjs +7 -7
  161. package/dist/install-integrity.json +115 -114
  162. package/dist/plays/play-description.d.mts +1 -1
  163. package/dist/plays/play-description.d.ts +1 -1
  164. package/dist/plays/run-request.d.mts +1 -1
  165. package/dist/plays/run-request.d.ts +1 -1
  166. package/dist/plays/run-request.js +2 -2
  167. package/dist/plays/run-request.mjs +1 -1
  168. package/dist/release.d.mts +1 -1
  169. package/dist/release.d.ts +1 -1
  170. package/dist/release.js +2 -2
  171. package/dist/release.mjs +1 -1
  172. package/dist/server.d.mts +2 -2
  173. package/dist/server.d.ts +2 -2
  174. package/dist/server.js +6 -6
  175. package/dist/server.mjs +4 -4
  176. package/package.json +1 -1
  177. package/dist/cli/auth-QIDL3YCW.js +0 -43
  178. package/dist/cli/describe-67GMIEIO.js +0 -50
  179. package/dist/cli/describe-QR7I3VOF.mjs +0 -50
  180. package/dist/cli/git-PIH5Z5LN.js +0 -25
  181. package/dist/cli/search-VC43NUY7.js +0 -32
  182. package/dist/cli/skills-4NQZISNK.js +0 -36
  183. package/dist/cli/tools-BAHK33FQ.js +0 -57
  184. package/dist/cli/update-EMIGRGJ7.js +0 -34
@@ -1576,9 +1576,10 @@ export type MonitorFleetWaitOptions = {
1576
1576
  onProgress?: (payload: MonitorFleetResult) => void;
1577
1577
  /**
1578
1578
  * Which terminal state ends the wait. `converged` (default) also stops on
1579
- * `degraded` and `deactivated`; `deactivated` stops on `deactivated` and
1580
- * `degraded`. A timeout is not an error: the last snapshot is returned and
1581
- * the caller reads `status` to decide the verdict.
1579
+ * `degraded`, `deactivated`, and `billing_suspended`; `deactivated` stops on
1580
+ * `deactivated`, `degraded`, and `billing_suspended`. A timeout is not an
1581
+ * error: the last snapshot is returned and the caller reads `status` to
1582
+ * decide the verdict.
1582
1583
  */
1583
1584
  until?: 'converged' | 'deactivated';
1584
1585
  };
@@ -7686,10 +7687,15 @@ export class DeeplineClient {
7686
7687
  ): Promise<MonitorFleetResult> {
7687
7688
  const timeoutMs = Math.max(1, options?.timeoutMs ?? 10 * 60_000);
7688
7689
  const pollIntervalMs = Math.max(1, options?.pollIntervalMs ?? 2_000);
7690
+ // The server's settled verdicts (`FLEET_SETTLED_VERDICTS` in
7691
+ // packages/monitors/fleets/verdict.ts): a fleet stays in each until someone
7692
+ // acts, so polling one only runs out the timeout. A deactivation wait does
7693
+ // not stop on `converged`. tests/sdk/monitor-fleets-namespace.test.ts
7694
+ // checks this against the server's list.
7689
7695
  const terminal: ReadonlySet<string> =
7690
7696
  options?.until === 'deactivated'
7691
- ? new Set(['deactivated', 'degraded'])
7692
- : new Set(['converged', 'degraded', 'deactivated']);
7697
+ ? new Set(['deactivated', 'degraded', 'billing_suspended'])
7698
+ : new Set(['converged', 'degraded', 'deactivated', 'billing_suspended']);
7693
7699
  const startedAt = Date.now();
7694
7700
  let latest = await this.getMonitorFleet(fleetId);
7695
7701
  while (true) {
@@ -610,6 +610,7 @@ export function normalizePlayRunStart(
610
610
  ...(runPackage.run.dashboardUrl
611
611
  ? { dashboardUrl: runPackage.run.dashboardUrl }
612
612
  : {}),
613
+ ...(runPackage.run.runUrl ? { runUrl: runPackage.run.runUrl } : {}),
613
614
  ...(runPackage.rateLimited ? { rateLimited: runPackage.rateLimited } : {}),
614
615
  ...(isTerminalPlayRunLifecycleStatus(status)
615
616
  ? raw.finalStatusView === 'full' && raw.runId === runPackage.run.id
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
205
205
  // getters keep their established compatibility behavior.
206
206
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
207
207
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
208
- version: '0.3.491',
208
+ version: '0.3.493',
209
209
  updateSummary: {
210
210
  introducedIn: '0.3.90',
211
211
  summary:
@@ -906,6 +906,8 @@ export interface PlayRunPackage {
906
906
  requestedBy?: { name: string };
907
907
  status: string;
908
908
  dashboardUrl?: string;
909
+ /** The Play page with this run selected. */
910
+ runUrl?: string;
909
911
  /** Durable acceptance time: the run record was created. */
910
912
  acceptedAt?: number | null;
911
913
  updatedAt?: number | null;
@@ -1032,6 +1034,8 @@ export interface PlayStatus {
1032
1034
  playName?: string;
1033
1035
  /** Dashboard URL for inspecting the play and its run output in the app. */
1034
1036
  dashboardUrl?: string;
1037
+ /** The Play page with this run selected. */
1038
+ runUrl?: string;
1035
1039
  /** Product-level play-run state. */
1036
1040
  status:
1037
1041
  | 'queued'
@@ -1932,6 +1936,8 @@ export interface PlayRunStart {
1932
1936
  contract?: Record<string, unknown> | null;
1933
1937
  /** Dashboard URL for the named play. */
1934
1938
  dashboardUrl?: string;
1939
+ /** The Play page with this run selected. */
1940
+ runUrl?: string;
1935
1941
  /** Terminal status returned when the start request used a short completion wait. */
1936
1942
  finalStatus?: unknown;
1937
1943
  /** Explicit full representation assembled by the canonical status reader. */
@@ -36,15 +36,31 @@ export const FLEET_LIFECYCLE_STATUSES = [
36
36
  export type FleetLifecycleStatus = (typeof FLEET_LIFECYCLE_STATUSES)[number];
37
37
 
38
38
  /** What a caller is told the fleet is doing. */
39
- export type FleetStatusVerdict =
40
- | 'converging'
41
- | 'converged'
42
- | 'degraded'
43
- | 'deactivating'
44
- | 'deactivated'
45
- | 'billing_suspending'
46
- | 'billing_suspended'
47
- | 'billing_reactivating';
39
+ export const FLEET_STATUS_VERDICTS = [
40
+ 'converging',
41
+ 'converged',
42
+ 'degraded',
43
+ 'deactivating',
44
+ 'deactivated',
45
+ 'billing_suspending',
46
+ 'billing_suspended',
47
+ 'billing_reactivating',
48
+ ] as const;
49
+
50
+ export type FleetStatusVerdict = (typeof FLEET_STATUS_VERDICTS)[number];
51
+
52
+ /**
53
+ * Verdicts a fleet stays in until new input arrives: a sync, a retry, a
54
+ * reactivation, or a payment. Polling one of these changes nothing, so every
55
+ * wait stops on them; the other verdicts are still moving on their own.
56
+ * `getMonitorFleet` answers these four without a "poll again" `next`.
57
+ */
58
+ export const FLEET_SETTLED_VERDICTS = [
59
+ 'converged',
60
+ 'degraded',
61
+ 'deactivated',
62
+ 'billing_suspended',
63
+ ] as const satisfies readonly FleetStatusVerdict[];
48
64
 
49
65
  /**
50
66
  * A Fleet's customer state. A Fleet has no `provisioning` state: its first
@@ -316,6 +316,15 @@ export const OPERATIONS_QUEUE_CATALOG = [
316
316
  60_000,
317
317
  300_000,
318
318
  ),
319
+ queue(
320
+ 'inbound-demo-sales',
321
+ 'Inbound demo sales notifications',
322
+ 'leased_workset',
323
+ 'inbound-demo',
324
+ 'Log form submissions and prepare one-hour follow-up drafts for review',
325
+ 3_720_000,
326
+ 3_900_000,
327
+ ),
319
328
  queue(
320
329
  'usage-rollup-fold',
321
330
  'Usage rollup fold',
@@ -288,6 +288,7 @@ export const QUEUE_CONNECTOR_BACKENDS: Readonly<
288
288
  'async-usage-recovery': 'postgres-outbox',
289
289
  'notification-deliveries': 'workpool',
290
290
  'inbound-demo-form-submissions': 'convex',
291
+ 'inbound-demo-sales': 'convex',
291
292
  'usage-rollup-fold': 'postgres-outbox',
292
293
  'play-deployment-jobs': 'workpool',
293
294
  'github-runner-wait': 'provider',
@@ -676,6 +676,24 @@
676
676
  "failureAlert": "vercel_route_wrapper",
677
677
  "domainReportRequired": true
678
678
  },
679
+ {
680
+ "id": "vercel.prebuilt-hit-rate-daily",
681
+ "name": "Prebuilt hit rate daily",
682
+ "scheduler": "vercel_cron",
683
+ "cadence": "20 0 * * *",
684
+ "timezone": "UTC",
685
+ "source": "apps/deepline-api/vercel.json",
686
+ "locator": "/api/v2/cron/prebuilt-hit-rate-daily",
687
+ "owner": "product",
688
+ "criticality": "reporting",
689
+ "purpose": "Count the previous UTC day's customer prebuilt Play output rows and rows with a result, per Play and workspace, before the cost stats refresh folds them into the hit rate search shows.",
690
+ "successDefinition": "Every scored prebuilt's successful customer root runs from that day are counted from their sheets and saved to prebuiltPlayResultDays.",
691
+ "failureDefinition": "Run listing, sheet reads or the Convex write fail, leaving the day's counts missing or partial.",
692
+ "startGraceMs": 300000,
693
+ "runTimeoutMs": 600000,
694
+ "failureAlert": "vercel_route_wrapper",
695
+ "domainReportRequired": true
696
+ },
679
697
  {
680
698
  "id": "vercel.sdk-cli-activity-digest",
681
699
  "name": "SDK CLI activity digest",
@@ -1540,6 +1558,24 @@
1540
1558
  "failureAlert": "convex_action_wrapper",
1541
1559
  "domainReportRequired": true
1542
1560
  },
1561
+ {
1562
+ "id": "convex.monitor-findings-roll",
1563
+ "name": "Monitor findings roll",
1564
+ "scheduler": "convex_cron",
1565
+ "cadence": "13 * * * *",
1566
+ "timezone": "UTC",
1567
+ "source": "packages/convex/crons.ts",
1568
+ "locator": "monitor findings roll",
1569
+ "owner": "monitors",
1570
+ "criticality": "maintenance",
1571
+ "purpose": "Move every Monitors findings row that holds findings and is behind today forward, and prune findings dedupe markers older than the window.",
1572
+ "successDefinition": "Every row behind today is rolled within the pass budget, or the remainder is left for the next hourly pass; zero rows behind is a valid no-op.",
1573
+ "failureDefinition": "A roll or prune page fails, leaving findings window totals stale for the rows behind today.",
1574
+ "startGraceMs": 120000,
1575
+ "runTimeoutMs": 1800000,
1576
+ "failureAlert": "convex_action_wrapper",
1577
+ "domainReportRequired": true
1578
+ },
1543
1579
  {
1544
1580
  "id": "convex.cleanup-expired-notification-audit-records",
1545
1581
  "name": "Cleanup expired notification audit records",
@@ -1648,6 +1684,24 @@
1648
1684
  "failureAlert": "convex_action_wrapper",
1649
1685
  "domainReportRequired": true
1650
1686
  },
1687
+ {
1688
+ "id": "convex.inbound-demo-sales",
1689
+ "name": "Inbound demo sales notifications",
1690
+ "scheduler": "convex_scheduled_action",
1691
+ "cadence": "on demand at form submission and one hour later",
1692
+ "timezone": "UTC",
1693
+ "source": "packages/convex/scheduledJobsNode.ts",
1694
+ "locator": "deliverInboundSalesTask",
1695
+ "owner": "inbound-demo",
1696
+ "criticality": "reporting",
1697
+ "purpose": "Log demo submissions and prepare unbooked follow-up drafts in Slack.",
1698
+ "successDefinition": "Slack delivery is confirmed or the task is suppressed for a booked meeting or a non-production environment.",
1699
+ "failureDefinition": "Booking verification, Slack delivery, or durable settlement fails.",
1700
+ "startGraceMs": 120000,
1701
+ "runTimeoutMs": 120000,
1702
+ "failureAlert": "convex_action_wrapper",
1703
+ "domainReportRequired": true
1704
+ },
1651
1705
  {
1652
1706
  "id": "convex.customer-db-preparation",
1653
1707
  "name": "Customer DB preparation",
@@ -33,6 +33,7 @@ export const MANUALLY_RUNNABLE_CONVEX_CRON_JOB_IDS = [
33
33
  'convex.observe-operational-queue-health',
34
34
  'convex.cleanup-expired-notification-audit-records',
35
35
  'convex.fail-stale-play-deployments',
36
+ 'convex.monitor-findings-roll',
36
37
  ] as const;
37
38
 
38
39
  export type ManuallyRunnableConvexCronJobId =
@@ -94,12 +95,12 @@ export const MAX_ORG_ALLOW_LIST = 20;
94
95
  * `MAX_ORG_ALLOW_LIST` distinct, non-empty organization ids; an
95
96
  * empty list would silently mean "nothing", which no caller intends.
96
97
  */
97
- export function normalizeOrgAllowList(
98
- orgIds: readonly string[],
99
- ): string[] {
98
+ export function normalizeOrgAllowList(orgIds: readonly string[]): string[] {
100
99
  const normalized = orgIds.map((orgId) => orgId.trim());
101
100
  if (normalized.length === 0) {
102
- throw new Error('An organization scope must name at least one organization.');
101
+ throw new Error(
102
+ 'An organization scope must name at least one organization.',
103
+ );
103
104
  }
104
105
  if (normalized.length > MAX_ORG_ALLOW_LIST) {
105
106
  throw new Error(
@@ -0,0 +1,162 @@
1
+ import {
2
+ defineBatchStrategyMap,
3
+ type BatchOperationStrategy,
4
+ } from './batching-types';
5
+
6
+ /**
7
+ * Crustdata's company identify takes up to 25 values of one identifier type
8
+ * and answers each with its own `{ matched_on, match_type, matches }` entry,
9
+ * echoing the value exactly as sent. The endpoint allows 30 requests a minute,
10
+ * so one call per row made a 278-company Play wait about ten minutes.
11
+ */
12
+ export const CRUSTDATA_COMPANY_IDENTIFY_MAX_BATCH_SIZE = 25;
13
+
14
+ const IDENTIFIER_FIELDS = [
15
+ 'professional_network_profile_urls',
16
+ 'domains',
17
+ 'names',
18
+ ] as const;
19
+ type IdentifierField = (typeof IDENTIFIER_FIELDS)[number];
20
+
21
+ type IdentifyPayload = Record<string, unknown>;
22
+ type IdentifyEntry = Record<string, unknown> & {
23
+ matched_on?: unknown;
24
+ matches?: unknown;
25
+ };
26
+
27
+ /** A row that names one value of one batchable identifier, and nothing else. */
28
+ function batchableIdentifier(
29
+ payload: IdentifyPayload,
30
+ ): { field: IdentifierField; value: string } | null {
31
+ const keys = Object.keys(payload);
32
+ if (keys.length !== 1) return null;
33
+ const field = IDENTIFIER_FIELDS.find((name) => name === keys[0]);
34
+ if (!field) return null;
35
+ const raw = payload[field];
36
+ const values = Array.isArray(raw) ? raw : [raw];
37
+ if (values.length !== 1 || typeof values[0] !== 'string') return null;
38
+ const value = values[0].trim();
39
+ return value ? { field, value } : null;
40
+ }
41
+
42
+ function passthroughKey(payload: IdentifyPayload): string {
43
+ return `passthrough:${JSON.stringify(payload)}`;
44
+ }
45
+
46
+ /** Crustdata echoes the value; this only absorbs case and trailing slashes. */
47
+ function looseKey(value: string): string {
48
+ return value.trim().toLowerCase().replace(/\/+$/, '');
49
+ }
50
+
51
+ function entriesOf(fullResult: unknown): IdentifyEntry[] {
52
+ const list = Array.isArray(fullResult)
53
+ ? fullResult
54
+ : (fullResult as { data?: unknown } | null)?.data;
55
+ if (!Array.isArray(list)) {
56
+ throw new Error('crustdata_v3_company_identify returned no result list.');
57
+ }
58
+ return list as IdentifyEntry[];
59
+ }
60
+
61
+ export const crustdataCompanyIdentifyBatchStrategy: BatchOperationStrategy<
62
+ IdentifyPayload,
63
+ IdentifyPayload,
64
+ object,
65
+ IdentifyEntry[]
66
+ > = {
67
+ sourceOperation: 'crustdata_v3_company_identify',
68
+ batchOperation: 'crustdata_v3_company_identify',
69
+ kind: 'identifier_batch',
70
+ maxBatchSize: CRUSTDATA_COMPANY_IDENTIFY_MAX_BATCH_SIZE,
71
+ // The legacy raw view is the same list, but rawV2 is the documented shape.
72
+ resultView: 'rawV2',
73
+ // The provider takes exactly one identifier type per request.
74
+ canBatchWith(left, right) {
75
+ const a = batchableIdentifier(left);
76
+ const b = batchableIdentifier(right);
77
+ return Boolean(a && b && a.field === b.field);
78
+ },
79
+ // A row naming several values, several identifier types or other fields is
80
+ // sent alone, exactly as written.
81
+ toBucketKey(payload) {
82
+ const identifier = batchableIdentifier(payload);
83
+ return identifier
84
+ ? `crustdata_v3_company_identify:${identifier.field}`
85
+ : passthroughKey(payload);
86
+ },
87
+ toItemKey(payload) {
88
+ const identifier = batchableIdentifier(payload);
89
+ return identifier
90
+ ? JSON.stringify([identifier.field, identifier.value])
91
+ : passthroughKey(payload);
92
+ },
93
+ compile(payloads) {
94
+ const [only] = payloads;
95
+ if (payloads.length === 1 && only && !batchableIdentifier(only)) {
96
+ return {
97
+ batchOperation: 'crustdata_v3_company_identify',
98
+ batchPayload: only,
99
+ items: [{ itemKey: passthroughKey(only), payload: only }],
100
+ };
101
+ }
102
+ const identifiers = payloads.map((payload) => {
103
+ const identifier = batchableIdentifier(payload);
104
+ if (!identifier) {
105
+ throw new Error(
106
+ 'crustdata_v3_company_identify batched a row without one identifier.',
107
+ );
108
+ }
109
+ return identifier;
110
+ });
111
+ return {
112
+ batchOperation: 'crustdata_v3_company_identify',
113
+ batchPayload: {
114
+ [identifiers[0]!.field]: identifiers.map(({ value }) => value),
115
+ },
116
+ items: payloads.map((payload, index) => ({
117
+ itemKey: JSON.stringify([
118
+ identifiers[index]!.field,
119
+ identifiers[index]!.value,
120
+ ]),
121
+ payload,
122
+ })),
123
+ };
124
+ },
125
+ splitResult(fullResult, compiled) {
126
+ const entries = entriesOf(fullResult);
127
+ if (
128
+ compiled.items.length === 1 &&
129
+ compiled.items[0]!.itemKey.startsWith('passthrough:')
130
+ ) {
131
+ return [
132
+ {
133
+ itemKey: compiled.items[0]!.itemKey,
134
+ result: entries,
135
+ rawResult: entries,
136
+ },
137
+ ];
138
+ }
139
+ const exact = new Map<string, IdentifyEntry>();
140
+ const loose = new Map<string, IdentifyEntry>();
141
+ for (const entry of entries) {
142
+ if (typeof entry?.matched_on !== 'string') continue;
143
+ exact.set(entry.matched_on, entry);
144
+ loose.set(looseKey(entry.matched_on), entry);
145
+ }
146
+ return compiled.items.map((item) => {
147
+ const [, value] = JSON.parse(item.itemKey) as [string, string];
148
+ const entry = exact.get(value) ?? loose.get(looseKey(value));
149
+ if (!entry) {
150
+ throw new Error(
151
+ `crustdata_v3_company_identify omitted the result for ${value}.`,
152
+ );
153
+ }
154
+ // The list a single-value request returns.
155
+ return { itemKey: item.itemKey, result: [entry], rawResult: [entry] };
156
+ });
157
+ },
158
+ };
159
+
160
+ export const crustdataCompanyIdentifyBatchStrategies = defineBatchStrategyMap({
161
+ crustdata_v3_company_identify: crustdataCompanyIdentifyBatchStrategy,
162
+ });
@@ -47,6 +47,11 @@
47
47
  */
48
48
  import { PLAY_RUNNER_TERMINAL_GRACE_SECONDS } from './/runtime-constants';
49
49
  import { DAYTONA_PLAY_RUNNER_LABEL_SOURCE } from './/runner-backends/backends/daytona-labels';
50
+ import {
51
+ runtimeSandboxOperationFromStates,
52
+ runtimeSandboxOperationFromStatesSqlCast,
53
+ runtimeSandboxOperationTargetState,
54
+ } from './/scheduler-backends/runtime-sandbox-operation';
50
55
 
51
56
  export { DAYTONA_PLAY_RUNNER_LABEL_SOURCE };
52
57
 
@@ -535,6 +540,9 @@ export function createPostgresDaytonaJanitorOwnershipPort(input: {
535
540
  const cleanup = `${quoteIdent(input.schema)}.${quoteIdent(
536
541
  'sandbox_cleanup_jobs_v2',
537
542
  )}`;
543
+ const operationStates = runtimeSandboxOperationFromStatesSqlCast(
544
+ quoteIdent(input.schema),
545
+ );
538
546
  return {
539
547
  async inspect({ sandboxId, routingDomain }) {
540
548
  if (!routingDomain) {
@@ -688,10 +696,10 @@ export function createPostgresDaytonaJanitorOwnershipPort(input: {
688
696
  WHERE NOT EXISTS (SELECT 1 FROM inserted)
689
697
  ), transitioned AS (
690
698
  UPDATE ${operations} AS operation
691
- SET state = 'deleting', updated_at = clock_timestamp()
699
+ SET state = $6, updated_at = clock_timestamp()
692
700
  FROM owned
693
701
  WHERE operation.operation_key = owned.operation_key
694
- AND operation.state = 'live'
702
+ AND operation.state = ANY($7::${operationStates})
695
703
  AND EXISTS (
696
704
  SELECT 1 FROM current_cleanup
697
705
  WHERE current_cleanup.run_id = owned.run_id
@@ -709,7 +717,15 @@ export function createPostgresDaytonaJanitorOwnershipPort(input: {
709
717
  FROM owned
710
718
  LEFT JOIN current_cleanup ON TRUE
711
719
  `,
712
- [operationKey, sandboxId, routingDomain, runId, attempt],
720
+ [
721
+ operationKey,
722
+ sandboxId,
723
+ routingDomain,
724
+ runId,
725
+ attempt,
726
+ runtimeSandboxOperationTargetState('janitor_authorize_cleanup'),
727
+ runtimeSandboxOperationFromStates('janitor_authorize_cleanup'),
728
+ ],
713
729
  );
714
730
  const row = result.rows[0];
715
731
  if (!row) return 'ownership_missing';
@@ -59,10 +59,12 @@ export const RUNTIME_RECEIPT_CONTROL_BUFFER_MAX_ITEMS = 2_000;
59
59
  */
60
60
  export const RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES = 16 * 1024 * 1024;
61
61
  /**
62
- * Oversized sheet admissions use bounded requests with room for returned row
63
- * metadata. A single row may exceed this target, up to the unchanged gateway
64
- * body ceiling; the target is never a new customer input-value limit.
62
+ * Stable-intent sheet admission responses include row details, so input bytes
63
+ * alone do not bound response size. Use a conservative row page size and
64
+ * split further when the gateway reports that the decoded response is too
65
+ * large. This is transport paging, not a customer input or output limit.
65
66
  */
67
+ export const RUNTIME_SHEET_START_MAX_RESPONSE_ROWS = 64;
66
68
  export const RUNTIME_SHEET_START_TARGET_BODY_BYTES = 12 * 1024 * 1024;
67
69
  /**
68
70
  * Receipt commands are measured before the runtime client adds its request
@@ -1,6 +1,7 @@
1
1
  import { bouncebanBatchStrategies } from './/bounceban-batching';
2
2
  import type { AnyBatchOperationStrategy } from './batching-types';
3
3
  import { bettercontactBatchStrategies } from './bettercontact-batching';
4
+ import { crustdataCompanyIdentifyBatchStrategies } from './crustdata-company-identify-batching';
4
5
  import { DEFAULT_PLAY_RUNTIME_BATCH_STRATEGIES } from './default-batch-strategies';
5
6
  import { freeCompanyLookupBatchStrategies } from './free-company-lookup-batching';
6
7
  import { fullenrichBatchStrategies } from './fullenrich-batching';
@@ -16,6 +17,7 @@ export const PLAY_RUNTIME_BATCH_OPERATION_REGISTRY: Record<
16
17
  ...DEFAULT_PLAY_RUNTIME_BATCH_STRATEGIES,
17
18
  ...bettercontactBatchStrategies,
18
19
  ...bouncebanBatchStrategies,
20
+ ...crustdataCompanyIdentifyBatchStrategies,
19
21
  ...freeCompanyLookupBatchStrategies,
20
22
  ...fullenrichBatchStrategies,
21
23
  ...opensosdataBatchStrategies,
@@ -1,29 +1,26 @@
1
1
  import { RECEIPT_STATUS_CODE } from './receipt-status';
2
+ import {
3
+ tenantWorkReceiptClaimTransition,
4
+ tenantWorkReceiptFromStatuses,
5
+ WORK_RECEIPT_LIVE_STATUSES,
6
+ } from './work-receipt-state-machine';
2
7
 
8
+ /** The claim's allowed-from codes, from `TENANT_WORK_RECEIPT_TRANSITIONS`. */
3
9
  export function workReceiptClaimableStatusCodes(input: {
4
10
  forceRefresh?: boolean;
5
11
  forceFailedRefresh?: boolean;
6
12
  reclaimRunning?: boolean;
7
13
  }): number[] {
8
- if (input.forceRefresh === true) {
9
- return [
10
- RECEIPT_STATUS_CODE.queued,
11
- RECEIPT_STATUS_CODE.failed,
12
- ...(input.reclaimRunning === true ? [RECEIPT_STATUS_CODE.running] : []),
13
- RECEIPT_STATUS_CODE.completed,
14
- RECEIPT_STATUS_CODE.skipped,
15
- ];
16
- }
17
- if (input.reclaimRunning === true) {
18
- return [
19
- RECEIPT_STATUS_CODE.queued,
20
- RECEIPT_STATUS_CODE.running,
21
- RECEIPT_STATUS_CODE.failed,
22
- ];
23
- }
24
- return [RECEIPT_STATUS_CODE.queued, RECEIPT_STATUS_CODE.failed];
14
+ return tenantWorkReceiptFromStatuses(
15
+ tenantWorkReceiptClaimTransition(input),
16
+ ).map((status) => RECEIPT_STATUS_CODE[status]);
25
17
  }
26
18
 
19
+ /** `queued` and `running`: the live statuses an owner may still write. */
20
+ const LIVE_STATUS_CODES_SQL = WORK_RECEIPT_LIVE_STATUSES.map(
21
+ (status) => `${RECEIPT_STATUS_CODE[status]}::smallint`,
22
+ ).join(',\n ');
23
+
27
24
  export function workReceiptClaimConflictPredicateSql(input: {
28
25
  receiptTable: string;
29
26
  claimableStatusesSql: string;
@@ -146,8 +143,7 @@ export function workReceiptActiveOwnerPredicateSql(input: {
146
143
  const table = input.receiptTable;
147
144
  const ownerRunAttemptSql = input.ownerRunAttemptSql ?? '0';
148
145
  return `${table}.status IN (
149
- ${RECEIPT_STATUS_CODE.queued}::smallint,
150
- ${RECEIPT_STATUS_CODE.running}::smallint
146
+ ${LIVE_STATUS_CODES_SQL}
151
147
  )
152
148
  /* owner: runtime; remove lease-owner fallback compat after ledger cutover M1 */
153
149
  AND COALESCE(${table}.lease_owner_run_id, ${table}.run_id) = ${input.ownerRunIdSql}
@@ -176,8 +172,7 @@ export function workReceiptReleaseOwnerPredicateSql(input: {
176
172
  const table = input.receiptTable;
177
173
  const ownerRunAttemptSql = input.ownerRunAttemptSql ?? '0';
178
174
  return `${table}.status IN (
179
- ${RECEIPT_STATUS_CODE.queued}::smallint,
180
- ${RECEIPT_STATUS_CODE.running}::smallint
175
+ ${LIVE_STATUS_CODES_SQL}
181
176
  )
182
177
  /* owner: runtime; remove lease-owner fallback compat after ledger cutover M1 */
183
178
  AND COALESCE(${table}.lease_owner_run_id, ${table}.run_id) = ${input.ownerRunIdSql}
@@ -195,8 +190,7 @@ export function workReceiptHeartbeatPredicateSql(input: {
195
190
  const table = input.receiptTable;
196
191
  const ownerRunAttemptSql = input.ownerRunAttemptSql ?? '0';
197
192
  return `${table}.status IN (
198
- ${RECEIPT_STATUS_CODE.queued}::smallint,
199
- ${RECEIPT_STATUS_CODE.running}::smallint
193
+ ${LIVE_STATUS_CODES_SQL}
200
194
  )
201
195
  /* owner: runtime; remove lease-owner fallback compat after ledger cutover M1 */
202
196
  AND COALESCE(${table}.lease_owner_run_id, ${table}.run_id) = ${input.ownerRunIdSql}
@@ -111,6 +111,26 @@ function classifyDaytonaAcquisitionFailure(
111
111
  return null;
112
112
  }
113
113
 
114
+ // Raised only by a failed Modal create or an open Modal circuit, so no Play code
115
+ // has started. A timed-out create can still produce a sandbox; the Modal
116
+ // backend records it for cleanup and never runs the Play in it. Modal failures
117
+ // after create stay on Modal.
118
+ const MODAL_PRE_CREATE_RECOVERY_REASONS: ReadonlySet<string> = new Set([
119
+ 'modal_capacity_exhausted_before_execution',
120
+ 'modal_sandbox_unavailable_before_execution',
121
+ 'modal_circuit_open_before_execution',
122
+ ]);
123
+
124
+ function classifyModalAcquisitionFailure(
125
+ error: unknown,
126
+ ): RuntimeSandboxPlacementFailureReason | null {
127
+ if (!isPlayRunRecoveryError(error)) return null;
128
+ return error.decision.stage === 'pre_code' &&
129
+ MODAL_PRE_CREATE_RECOVERY_REASONS.has(error.decision.reason)
130
+ ? 'provider_capacity_exhausted'
131
+ : null;
132
+ }
133
+
114
134
  /**
115
135
  * Deep placement Implementation. Provider order alone never permits a retry:
116
136
  * the policy must also name the exact pre-execution transition and the source
@@ -261,7 +281,7 @@ export function createRuntimeSandboxPlacementBackendForPolicy(
261
281
  },
262
282
  modal: {
263
283
  backend: overrides.modal ?? modalPlayRunnerBackend,
264
- classifyAcquisitionFailure: () => null,
284
+ classifyAcquisitionFailure: classifyModalAcquisitionFailure,
265
285
  },
266
286
  },
267
287
  });
@@ -298,6 +318,11 @@ export const modalOnlyPlayRunnerBackend =
298
318
  RUNTIME_SANDBOX_PLACEMENT_POLICIES.modalOnlyV1,
299
319
  );
300
320
 
321
+ export const modalThenDaytonaPlayRunnerBackend =
322
+ createRuntimeSandboxPlacementBackendForPolicy(
323
+ RUNTIME_SANDBOX_PLACEMENT_POLICIES.modalThenDaytonaV1,
324
+ );
325
+
301
326
  const DEFAULT_POLICY_BACKENDS: Readonly<
302
327
  Record<RuntimeSandboxPlacementPolicyId, PlayRunnerBackend>
303
328
  > = {
@@ -308,6 +333,8 @@ const DEFAULT_POLICY_BACKENDS: Readonly<
308
333
  [RUNTIME_SANDBOX_PLACEMENT_POLICIES.daytonaModalCanaryV1]:
309
334
  daytonaModalCanaryPlayRunnerBackend,
310
335
  [RUNTIME_SANDBOX_PLACEMENT_POLICIES.modalOnlyV1]: modalOnlyPlayRunnerBackend,
336
+ [RUNTIME_SANDBOX_PLACEMENT_POLICIES.modalThenDaytonaV1]:
337
+ modalThenDaytonaPlayRunnerBackend,
311
338
  };
312
339
 
313
340
  export function resolveDefaultRuntimeSandboxPlacementBackend(