deepline 0.3.461 → 0.3.463
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.
- package/dist/bundling-sources/sdk/src/client-core.ts +7593 -0
- package/dist/bundling-sources/sdk/src/client.ts +8 -7366
- package/dist/bundling-sources/sdk/src/http-core.ts +1239 -0
- package/dist/bundling-sources/sdk/src/http.ts +6 -1231
- package/dist/bundling-sources/sdk/src/index.ts +4 -1
- package/dist/bundling-sources/sdk/src/play.ts +5 -5
- package/dist/bundling-sources/sdk/src/plays/client-core.ts +437 -0
- package/dist/bundling-sources/sdk/src/plays/client.ts +4 -421
- package/dist/bundling-sources/sdk/src/plays/input-example.ts +3 -4
- package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -1
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/server.ts +43 -0
- package/dist/bundling-sources/sdk/src/types.ts +15 -5
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +15 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +17 -17
- package/dist/bundling-sources/shared_libs/monitors/callback-security.ts +0 -307
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +3 -0
- package/dist/bundling-sources/shared_libs/monitors/lifecycle-notifications.ts +3 -2
- package/dist/bundling-sources/shared_libs/monitors/package.json +2 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +34 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +61 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +122 -2
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +11 -1
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-failure-codes.ts +24 -0
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +32 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +57 -3
- package/dist/bundling-sources/shared_libs/observability/scheduled-work.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +66 -1
- package/dist/bundling-sources/shared_libs/play-data-plane/sheet-column-storage.ts +36 -7
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +250 -11
- package/dist/bundling-sources/shared_libs/play-runtime/array-input-store.ts +319 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +991 -359
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-reaper.ts +110 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +155 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +110 -6
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +127 -13
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +14 -1
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +57 -1
- package/dist/bundling-sources/shared_libs/play-runtime/free-company-lookup-batching.ts +218 -0
- package/dist/bundling-sources/shared_libs/play-runtime/gateway-postgres-admission.ts +42 -5
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-budget-state-backend.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +92 -31
- package/dist/bundling-sources/shared_libs/play-runtime/governor/block-reserving-budget-state-backend.ts +69 -14
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +93 -23
- package/dist/bundling-sources/shared_libs/play-runtime/governor/in-memory-rate-state-backend.ts +15 -4
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +22 -18
- package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +190 -14
- package/dist/bundling-sources/shared_libs/play-runtime/memory-ledger.ts +131 -0
- package/dist/bundling-sources/shared_libs/play-runtime/modal-runtime-config.ts +77 -2
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +271 -2
- package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +51 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +27 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-text-for-log.ts +63 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-event-transport.ts +112 -16
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +104 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +265 -151
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-gateway-transport.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-progress-push.ts +35 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-sheet-persistence-retry.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-control-transport.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-labels.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +136 -70
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +237 -36
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +148 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +285 -32
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +251 -56
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +29 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/sandbox-create-outcome.ts +27 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +22 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +1397 -382
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-array-input-receipts.ts +920 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +16 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-environment.ts +38 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-flow.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +14 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-writer.ts +31 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +47 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +20 -7
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/index.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +1496 -320
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +31 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1389 -129
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +162 -23
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +499 -115
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +377 -9
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +117 -8
- package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +25 -0
- package/dist/bundling-sources/shared_libs/play-runtime/terminal-runtime-performance.ts +391 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +40 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/index.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/mapped-calls.ts +171 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/receipt-cohort.ts +16 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +38 -12
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +33 -9
- package/dist/bundling-sources/shared_libs/play-runtime/transport-error-diagnostics.ts +28 -0
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +55 -5
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +41 -1
- package/dist/bundling-sources/shared_libs/plays/contracts.ts +4 -0
- package/dist/bundling-sources/shared_libs/plays/dataset.ts +9 -3
- package/dist/bundling-sources/shared_libs/plays/deploy/manifest-contract.ts +2 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/manifest.ts +3 -2
- package/dist/bundling-sources/shared_libs/plays/deploy/project-serializer.ts +2 -2
- package/dist/bundling-sources/shared_libs/plays/run-output-summary.ts +66 -0
- package/dist/bundling-sources/shared_libs/plays/script-entry.ts +1 -1
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +43 -1
- package/dist/bundling-sources/shared_libs/product-notifications/content.ts +9 -0
- package/dist/bundling-sources/shared_libs/product-notifications/email.ts +91 -13
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +3 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +41 -24
- package/dist/bundling-sources/shared_libs/security/attested-client-ip.ts +91 -0
- package/dist/bundling-sources/shared_libs/security/internal-actor.ts +0 -11
- package/dist/cli/{auth-6HJXNWUG.mjs → auth-LZLBR4C3.mjs} +5 -4
- package/dist/cli/auth-XPGKBJKB.js +41 -0
- package/dist/cli/{billing-6P5HO6QG.js → billing-6TJPNJQD.js} +152 -78
- package/dist/cli/{billing-MJ42N7YF.mjs → billing-OTOP5RE4.mjs} +84 -10
- package/dist/cli/{chunk-FCAZQ7WV.js → chunk-2NISBXMN.js} +52 -50
- package/dist/cli/{chunk-PNATXKLP.js → chunk-2ZIRCBYG.js} +6 -6
- package/dist/cli/{chunk-5FDKJQZE.js → chunk-3BOIOCNX.js} +1 -1
- package/dist/cli/chunk-3BVLLJ3H.mjs +1038 -0
- package/dist/cli/{chunk-FJZILBL7.mjs → chunk-3U5EAP6E.mjs} +5 -5
- package/dist/cli/{describe-FRAVCY5F.mjs → chunk-4YZKBBLZ.mjs} +19 -36
- package/dist/cli/{chunk-QWRHGGUH.js → chunk-5DRNNC72.js} +20 -2
- package/dist/cli/{chunk-Z2GUFYT6.js → chunk-5LEAXRHV.js} +11 -11
- package/dist/cli/{chunk-5MDIZX7M.js → chunk-5LHXOIPT.js} +8 -6
- package/dist/cli/{chunk-NMJ4D2WO.js → chunk-6PMCRYDA.js} +216 -91
- package/dist/cli/{chunk-EBU7LQ64.js → chunk-6V7KVRR5.js} +3 -3
- package/dist/cli/{chunk-MGXEUZHL.mjs → chunk-7D6X7IXW.mjs} +7 -5
- package/dist/cli/{chunk-SAZFZQRI.js → chunk-7FCYPAPP.js} +2 -2
- package/dist/cli/{chunk-ACCR7POB.js → chunk-7XYDDCQ2.js} +27 -27
- package/dist/cli/{chunk-5IYOUBFZ.js → chunk-ALZBANZI.js} +28 -54
- package/dist/cli/{chunk-3DNKFH2G.mjs → chunk-BAPTQDLF.mjs} +19 -1
- package/dist/cli/chunk-BGNWI3KH.js +827 -0
- package/dist/cli/{chunk-V7REJRDZ.mjs → chunk-C25QE4CH.mjs} +1 -1
- package/dist/cli/{chunk-FGMX4HUZ.js → chunk-CBZP6J3V.js} +29 -27
- package/dist/cli/{chunk-QEYHTIV4.mjs → chunk-CTQ56DXP.mjs} +10 -1
- package/dist/cli/{chunk-IHHLTHE7.mjs → chunk-CVQ7N5CV.mjs} +267 -38
- package/dist/cli/{chunk-7DH2FD7Y.mjs → chunk-D464JW3N.mjs} +5 -85
- package/dist/cli/{chunk-MEAIOXJL.mjs → chunk-DHXCBITQ.mjs} +7 -5
- package/dist/cli/chunk-F2RHUPVH.mjs +827 -0
- package/dist/cli/chunk-F6QV42MC.mjs +91 -0
- package/dist/cli/{chunk-OZBWRICM.js → chunk-FK2HNDCN.js} +2 -2
- package/dist/cli/{chunk-BGY2PLP7.mjs → chunk-GUT7CLOL.mjs} +23 -49
- package/dist/cli/{chunk-RY4IVOU3.mjs → chunk-I624J4H5.mjs} +16 -806
- package/dist/cli/{chunk-Z2XUZC34.js → chunk-IAYSWZDJ.js} +188 -76
- package/dist/cli/{chunk-FGLKOWSC.mjs → chunk-IKWRUNAP.mjs} +1 -1
- package/dist/cli/{chunk-KCCOQ5G5.js → chunk-JVDKZJUH.js} +511 -282
- package/dist/cli/{chunk-HDFRJ4IT.mjs → chunk-JVHOS3K3.mjs} +177 -65
- package/dist/cli/chunk-LYFKBLJI.mjs +1039 -0
- package/dist/cli/{chunk-SLEUWLJE.mjs → chunk-MSY22NQW.mjs} +5 -5
- package/dist/cli/{chunk-5FY72YOV.js → chunk-NAPTMYTY.js} +8 -8
- package/dist/cli/{chunk-O6QOMHCH.js → chunk-NDHJR2WZ.js} +37 -35
- package/dist/cli/{chunk-KXMNM4AQ.js → chunk-NMU3VR5U.js} +4 -5
- package/dist/cli/chunk-NTLI6P6Y.mjs +19 -0
- package/dist/cli/{chunk-RFONC4WJ.mjs → chunk-O3BJYD6D.mjs} +3 -3
- package/dist/cli/{describe-2WQY7ZCY.js → chunk-PVY4DPPF.js} +27 -44
- package/dist/cli/{chunk-WIYWSYDS.mjs → chunk-Q2EIZKVX.mjs} +3 -3
- package/dist/cli/{chunk-VZBCEA5S.mjs → chunk-RD6IQ2JY.mjs} +223 -92
- package/dist/cli/chunk-RGOUCIIZ.js +1039 -0
- package/dist/cli/{chunk-EIMG75BT.mjs → chunk-S3A4IXBQ.mjs} +4 -5
- package/dist/cli/{chunk-QIW7TVV6.mjs → chunk-S4XQCFES.mjs} +14 -12
- package/dist/cli/chunk-SKU6ECIY.js +19 -0
- package/dist/cli/{chunk-CRYOUPEB.js → chunk-TIRBDQ3W.js} +16 -16
- package/dist/cli/{chunk-G7L27KZB.mjs → chunk-TKAQR3IB.mjs} +31 -21
- package/dist/cli/{chunk-MDJPEGVN.js → chunk-UC4SFYNU.js} +392 -261
- package/dist/cli/{chunk-3BMLICF7.mjs → chunk-UIURR26V.mjs} +13 -8
- package/dist/cli/{chunk-TNMBPMMC.js → chunk-UROQDCVW.js} +13 -4
- package/dist/cli/{chunk-R64BGGRQ.mjs → chunk-VDGTTH7K.mjs} +2 -2
- package/dist/cli/chunk-VLEVVDWG.js +91 -0
- package/dist/cli/{chunk-R2GLGLDR.mjs → chunk-VPHN2HAL.mjs} +216 -91
- package/dist/cli/chunk-VY2GBNTX.js +1038 -0
- package/dist/cli/{chunk-CFUTOWE4.js → chunk-WG3KGAII.js} +8 -88
- package/dist/cli/{chunk-QAJAJPKK.mjs → chunk-WUMIYOXQ.mjs} +4 -2
- package/dist/cli/{chunk-SCIR5JXW.js → chunk-WUZS2HK6.js} +56 -51
- package/dist/cli/{chunk-T3MVIPHG.mjs → chunk-XDWS2JJT.mjs} +1 -1
- package/dist/cli/{chunk-KGQNIA37.js → chunk-XQCTG5OO.js} +44 -34
- package/dist/cli/{chunk-KVJ5VHW5.mjs → chunk-XW2JIYG7.mjs} +2 -2
- package/dist/cli/chunk-YGGIZ3VT.js +920 -0
- package/dist/cli/command-docs.d.mts +5 -0
- package/dist/cli/command-docs.d.ts +5 -0
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-NX7NO3O6.js → csv-EH5QWR4O.js} +13 -12
- package/dist/cli/{csv-DQ6GW5B5.mjs → csv-OK45Z5XQ.mjs} +4 -3
- package/dist/cli/{db-R72DFMP6.js → db-3ESJKETS.js} +30 -27
- package/dist/cli/{db-2YP33M4K.mjs → db-6Z5E4HKN.mjs} +10 -7
- package/dist/cli/describe-PNDQB7YS.mjs +48 -0
- package/dist/cli/describe-QUF7VTTR.js +48 -0
- package/dist/cli/describe-core.d.mts +153 -5
- package/dist/cli/describe-core.d.ts +153 -5
- package/dist/cli/describe-core.js +9 -5
- package/dist/cli/describe-core.mjs +10 -6
- package/dist/cli/{executions-WFBU7L2Q.mjs → executions-2NTWQFEG.mjs} +7 -5
- package/dist/cli/{executions-ZLHD4QIT.js → executions-KUOBRX5V.js} +9 -7
- package/dist/cli/{feedback-CN3HJFVF.mjs → feedback-7RPRMSGY.mjs} +6 -5
- package/dist/cli/{feedback-NDV6TPHG.js → feedback-UPHAZJ4C.js} +10 -9
- package/dist/cli/getting-started.d.mts +6 -6
- package/dist/cli/getting-started.d.ts +6 -6
- package/dist/cli/getting-started.js +2 -2
- package/dist/cli/getting-started.mjs +1 -1
- package/dist/cli/{git-QAD6E3HW.mjs → git-SCYP6WSZ.mjs} +5 -4
- package/dist/cli/git-UH653WHV.js +25 -0
- package/dist/cli/index.js +152 -142
- package/dist/cli/index.mjs +56 -46
- package/dist/cli/{legacy-noops-KVC5QJ74.js → legacy-noops-7XMFCVRG.js} +8 -7
- package/dist/cli/{legacy-noops-TPTKNBI2.mjs → legacy-noops-A4KYAGI6.mjs} +5 -4
- package/dist/cli/{monitors-SV57JFLO.mjs → monitors-FLC5J7RI.mjs} +19 -6
- package/dist/cli/{monitors-KCROV6PJ.js → monitors-NZV6IX5H.js} +103 -90
- package/dist/cli/{org-NJYX5743.js → org-IZ7UP3XF.js} +70 -67
- package/dist/cli/{org-KX6QIR7A.mjs → org-LUETJ7Z5.mjs} +9 -6
- package/dist/cli/pages-22ML3O7O.js +252 -0
- package/dist/cli/pages-EUX5EAGF.mjs +252 -0
- package/dist/cli/{play-IQQ57L7Z.mjs → play-CDHPAKKM.mjs} +512 -1508
- package/dist/cli/{play-32L7EQN4.js → play-USJBQADG.js} +1090 -2086
- package/dist/cli/{providers-4WEC2EQN.mjs → providers-CCXZ3SQF.mjs} +7 -5
- package/dist/cli/{providers-ZQV6QLVQ.js → providers-WFEUNPGC.js} +10 -8
- package/dist/cli/{quickstart-HKUSFADF.js → quickstart-O4JSUORZ.js} +13 -12
- package/dist/cli/{quickstart-RQ76RIUE.mjs → quickstart-ZUULI635.mjs} +5 -4
- package/dist/cli/run-ISDJYJMU.js +443 -0
- package/dist/cli/run-QJ4NX5F5.mjs +443 -0
- package/dist/cli/{search-ZRAVFBZC.mjs → search-IX3XKZJ3.mjs} +8 -6
- package/dist/cli/search-TIFNLRPM.js +32 -0
- package/dist/cli/{secrets-CMJOVNVH.mjs → secrets-7VUDXTUZ.mjs} +7 -5
- package/dist/cli/{secrets-J3G5Y43U.js → secrets-ELQSNCTR.js} +16 -14
- package/dist/cli/{sessions-WY7VN4AE.js → sessions-A3FG3AZX.js} +6 -5
- package/dist/cli/{sessions-MDQYY5CB.mjs → sessions-VOIQ62GB.mjs} +5 -4
- package/dist/cli/{settings-4RWZPCT5.mjs → settings-S6N6EFBG.mjs} +14 -11
- package/dist/cli/{settings-HTNTFKCE.js → settings-ZTXQEMZI.js} +80 -77
- package/dist/cli/{setup-P3GYYZWG.mjs → setup-AYPIK4JE.mjs} +12 -10
- package/dist/cli/{setup-QGCAP62X.js → setup-Y3WOIFLS.js} +53 -51
- package/dist/cli/{skills-7NAE4ICL.mjs → skills-5SF5QWNI.mjs} +7 -6
- package/dist/cli/skills-MWFRMG3H.js +31 -0
- package/dist/cli/tools-3XNZ4J64.mjs +55 -0
- package/dist/cli/tools-XEC4OD3R.js +55 -0
- package/dist/cli/{update-GODLRKNB.mjs → update-3U4OVX5R.mjs} +9 -8
- package/dist/cli/update-DWYEYTZE.js +33 -0
- package/dist/cli/{workflow-4BXOUVEO.mjs → workflow-2M5JP7SA.mjs} +10 -8
- package/dist/cli/{workflow-AO3A6LXN.js → workflow-RM7H7555.js} +20 -18
- package/dist/client-DS2IWYZF.d.ts +10 -0
- package/dist/client-DTwnz_AW.d.mts +10 -0
- package/dist/{client-CYqG23K1.d.ts → client-core-B_6HAIBy.d.ts} +385 -12
- package/dist/{client-BbU5_j7n.d.mts → client-core-DzBSlY1U.d.mts} +385 -12
- package/dist/{compiler-manifest-CWz_sNOQ.d.ts → compiler-manifest-Dcyd3-Zd.d.mts} +43 -1
- package/dist/{compiler-manifest-CWz_sNOQ.d.mts → compiler-manifest-Dcyd3-Zd.d.ts} +43 -1
- package/dist/errors-d-sTrZhe.d.mts +142 -0
- package/dist/errors-yQwfgrcX.d.ts +142 -0
- package/dist/{index-BF2JB_Ug.d.mts → index-C6oXchjN.d.mts} +1 -1
- package/dist/{index-4NPXDzlD.d.ts → index-P56zy_z5.d.ts} +1 -1
- package/dist/index.d.mts +11 -147
- package/dist/index.d.ts +11 -147
- package/dist/index.js +16 -12
- package/dist/index.mjs +15 -11
- package/dist/install-integrity.json +141 -104
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +2 -1
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/play-description.js +2 -2
- package/dist/plays/play-description.mjs +1 -1
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +17 -0
- package/dist/server.d.ts +17 -0
- package/dist/server.js +76 -0
- package/dist/server.mjs +76 -0
- package/package.json +6 -1
- package/dist/cli/auth-IACERYQH.js +0 -40
- package/dist/cli/chunk-PQUUWFXY.js +0 -95
- package/dist/cli/chunk-YBWAG72P.mjs +0 -95
- package/dist/cli/chunk-YQDUODZW.js +0 -1710
- package/dist/cli/git-JVI36ZFV.js +0 -24
- package/dist/cli/search-75X5LTDE.js +0 -30
- package/dist/cli/skills-BKJ53JOQ.js +0 -30
- package/dist/cli/tools-COWMIEJ6.mjs +0 -45
- package/dist/cli/tools-TASOCE7I.js +0 -45
- package/dist/cli/update-SJIKVME6.js +0 -32
|
@@ -17,6 +17,22 @@ export const PLAY_RUNNER_TERMINAL_GRACE_SECONDS = 90;
|
|
|
17
17
|
*/
|
|
18
18
|
export const PLAY_RUNNER_STARTUP_GRACE_SECONDS = 4 * 60;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Longest sandbox network cut a running Play must survive. Daytona cut running
|
|
22
|
+
* sandboxes off for 564 to 621 seconds between 2026-10-27 and 2026-10-30 while
|
|
23
|
+
* their processes kept running.
|
|
24
|
+
*/
|
|
25
|
+
export const SANDBOX_NETWORK_CUT_MAX_MS = 11 * 60_000;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* How long the runner keeps retrying a gateway request that gets no HTTP
|
|
29
|
+
* response at all: the longest cut, plus a 30-second request timeout and its
|
|
30
|
+
* backoff on each side of it. A request that gets an error response keeps its
|
|
31
|
+
* own, shorter budget.
|
|
32
|
+
*/
|
|
33
|
+
export const RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS =
|
|
34
|
+
SANDBOX_NETWORK_CUT_MAX_MS + 60_000;
|
|
35
|
+
|
|
20
36
|
/**
|
|
21
37
|
* Runner timeout includes setup, cleanup, and billing headroom after the
|
|
22
38
|
* user-code runtime cap.
|
|
@@ -86,6 +86,44 @@ export function normalizePlayRuntimeSelection(
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* The app's own runtime, on a named sandbox placement policy. Internal-only:
|
|
91
|
+
* the `play_run.sandbox_placement` capability in
|
|
92
|
+
* `@deepline/auth/internal-capabilities` decides who may send it.
|
|
93
|
+
*/
|
|
94
|
+
export type PlayNativeRuntimeSelection = {
|
|
95
|
+
environment: 'native';
|
|
96
|
+
sandboxPlacementPolicy: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** Every `runtime` value a Play run accepts. */
|
|
100
|
+
export type PlayRunRuntimeSelection =
|
|
101
|
+
| PlayRuntimeSelection
|
|
102
|
+
| PlayNativeRuntimeSelection;
|
|
103
|
+
|
|
104
|
+
export function normalizePlayRunRuntimeSelection(
|
|
105
|
+
value: unknown,
|
|
106
|
+
): PlayRunRuntimeSelection | null {
|
|
107
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) return null;
|
|
108
|
+
const record = value as Record<string, unknown>;
|
|
109
|
+
if (record.environment !== 'native') {
|
|
110
|
+
return normalizePlayRuntimeSelection(value);
|
|
111
|
+
}
|
|
112
|
+
if (
|
|
113
|
+
Object.keys(record).some(
|
|
114
|
+
(key) => key !== 'environment' && key !== 'sandboxPlacementPolicy',
|
|
115
|
+
)
|
|
116
|
+
) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
const sandboxPlacementPolicy = normalizePlayRuntimeSandboxPlacementPolicy(
|
|
120
|
+
record.sandboxPlacementPolicy,
|
|
121
|
+
);
|
|
122
|
+
return sandboxPlacementPolicy
|
|
123
|
+
? { environment: 'native', sandboxPlacementPolicy }
|
|
124
|
+
: null;
|
|
125
|
+
}
|
|
126
|
+
|
|
89
127
|
export function normalizePlayRuntimeEnvironment(
|
|
90
128
|
value: unknown,
|
|
91
129
|
): PlayRuntimeEnvironment | null {
|
|
@@ -252,6 +252,12 @@ export function createRuntimeDispatchFlow<
|
|
|
252
252
|
: null;
|
|
253
253
|
if (!providerPermit) {
|
|
254
254
|
releaseExecutionSlot();
|
|
255
|
+
// A backend without a local due permit must re-enter provider
|
|
256
|
+
// admission. First let FIFO waiters return their reserved slots:
|
|
257
|
+
// immediately resolved provider admissions can otherwise circulate
|
|
258
|
+
// that reservation forever without allowing timers or aborts to run.
|
|
259
|
+
// Neither a provider permit nor an execution slot is held here.
|
|
260
|
+
await new Promise<void>((resolve) => setTimeout(resolve, 0));
|
|
255
261
|
continue;
|
|
256
262
|
}
|
|
257
263
|
}
|
|
@@ -19,6 +19,7 @@ export const RUNTIME_TEST_FAULT_IDS = [
|
|
|
19
19
|
'receipt_claim_response_timeout',
|
|
20
20
|
'modal_sandbox_create_resource_exhausted',
|
|
21
21
|
'runtime_sheet_page_tail_hold_ms',
|
|
22
|
+
'runner_heartbeat_silence_ms',
|
|
22
23
|
] as const;
|
|
23
24
|
|
|
24
25
|
export type RuntimeTestFaultName = (typeof RUNTIME_TEST_FAULT_IDS)[number];
|
|
@@ -40,7 +41,8 @@ export type RuntimeIncidentSafetyFact =
|
|
|
40
41
|
| 'bounded_provider_execution'
|
|
41
42
|
| 'retry_or_explicit_recovery'
|
|
42
43
|
| 'no_user_code_before_recovery'
|
|
43
|
-
| 'all_rows_settle_once'
|
|
44
|
+
| 'all_rows_settle_once'
|
|
45
|
+
| 'no_loss_verdict_without_provider_proof';
|
|
44
46
|
|
|
45
47
|
/**
|
|
46
48
|
* The automated evidence that proves this drill. A focused regression owns a
|
|
@@ -353,6 +355,29 @@ export const RUNTIME_INCIDENT_DRILL_CATALOG: readonly RuntimeIncidentDrill[] = [
|
|
|
353
355
|
target: 'page-tail-sheet-write-hold-e2e',
|
|
354
356
|
},
|
|
355
357
|
},
|
|
358
|
+
{
|
|
359
|
+
id: 'runner_heartbeat_silence_ms',
|
|
360
|
+
description:
|
|
361
|
+
'Stop a live detached runner heartbeating for a bounded time while its process keeps running.',
|
|
362
|
+
topologies: LOCAL_AND_PREVIEW_TOPOLOGIES,
|
|
363
|
+
control: {
|
|
364
|
+
kind: 'runtime_test_fault',
|
|
365
|
+
// The 120-second lease plus 80 seconds of confirmation puts the first
|
|
366
|
+
// provider read at about 200 seconds. The rest absorbs late wakes, so
|
|
367
|
+
// that read lands inside the silence and not after it.
|
|
368
|
+
defaultValue: 300_000,
|
|
369
|
+
valueMeaning: 'milliseconds',
|
|
370
|
+
},
|
|
371
|
+
expected: {
|
|
372
|
+
outcome:
|
|
373
|
+
'The worker asks the provider once the lease and confirmation pass, the sandbox is not proven gone, and the same attempt finishes after heartbeats return.',
|
|
374
|
+
safetyFacts: ['same_logical_run', 'no_loss_verdict_without_provider_proof'],
|
|
375
|
+
},
|
|
376
|
+
verification: {
|
|
377
|
+
kind: 'preview_black_box',
|
|
378
|
+
target: 'silent-runner-liveness-e2e',
|
|
379
|
+
},
|
|
380
|
+
},
|
|
356
381
|
];
|
|
357
382
|
|
|
358
383
|
export type RuntimeTestFaultDrill = Omit<
|
|
@@ -24,6 +24,31 @@ export const RUNTIME_SHEET_ADMISSION_OPERATION_CONTRACT: DeployedOperationContra
|
|
|
24
24
|
},
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
+
/** Named, run-scoped array source snapshots. Older receivers retain legacy array admission. */
|
|
28
|
+
export const RUNTIME_ARRAY_INPUT_CAPABILITIES = {
|
|
29
|
+
runtime_array_input_get_manifest: 'receipt.read',
|
|
30
|
+
runtime_array_input_begin: 'receipt.write',
|
|
31
|
+
runtime_array_input_put_page: 'receipt.write',
|
|
32
|
+
runtime_array_input_seal: 'receipt.write',
|
|
33
|
+
runtime_array_input_read_page: 'receipt.read',
|
|
34
|
+
} as const satisfies Readonly<Record<string, RuntimeExecutionCapability>>;
|
|
35
|
+
|
|
36
|
+
export const RUNTIME_ARRAY_INPUT_OPERATION_CONTRACT: DeployedOperationContract =
|
|
37
|
+
deployed.operation({
|
|
38
|
+
id: 'runtime-array-input-actions',
|
|
39
|
+
actions: RUNTIME_ARRAY_INPUT_CAPABILITIES,
|
|
40
|
+
olderReceiver: {
|
|
41
|
+
runtime_array_input_get_manifest: {
|
|
42
|
+
kind: 'feature-unavailable',
|
|
43
|
+
code: 'RUNTIME_ARRAY_INPUT_UNAVAILABLE',
|
|
44
|
+
},
|
|
45
|
+
runtime_array_input_begin: {
|
|
46
|
+
kind: 'feature-unavailable',
|
|
47
|
+
code: 'RUNTIME_ARRAY_INPUT_UNAVAILABLE',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
|
|
27
52
|
/**
|
|
28
53
|
* One declarative owner for the runtime action → authority relationship. The
|
|
29
54
|
* route still owns authentication and execution; callers can add an action in
|
|
@@ -73,6 +98,7 @@ export const RUNTIME_OPERATION_CAPABILITIES = {
|
|
|
73
98
|
resolve_secret: 'secret.resolve',
|
|
74
99
|
// Provider prices and availability use the existing discovery authority.
|
|
75
100
|
get_billing_entitlements: 'tool.inspect',
|
|
101
|
+
write_page: 'page.write',
|
|
76
102
|
} as const satisfies Readonly<Record<string, RuntimeExecutionCapability>>;
|
|
77
103
|
|
|
78
104
|
export const RUNTIME_OPERATION_CONTRACT: DeployedOperationContract =
|
|
@@ -84,6 +110,10 @@ export const RUNTIME_OPERATION_CONTRACT: DeployedOperationContract =
|
|
|
84
110
|
kind: 'feature-unavailable',
|
|
85
111
|
code: 'BILLING_ENTITLEMENTS_UNAVAILABLE',
|
|
86
112
|
},
|
|
113
|
+
write_page: {
|
|
114
|
+
kind: 'feature-unavailable',
|
|
115
|
+
code: 'PAGES_UNAVAILABLE',
|
|
116
|
+
},
|
|
87
117
|
project_run_events: {
|
|
88
118
|
kind: 'equivalent-fallback',
|
|
89
119
|
action: 'append_run_events',
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
RuntimeReceiptWriterResultCountError,
|
|
36
36
|
writeRuntimeReceiptWithBackpressure,
|
|
37
37
|
} from './runtime-receipt-writer';
|
|
38
|
+
import { RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS } from './runtime-constants';
|
|
38
39
|
|
|
39
40
|
type ReceiptOutput =
|
|
40
41
|
| RuntimeStepReceipt
|
|
@@ -122,8 +123,12 @@ export type RuntimeReceiptStoreHandlers = Required<
|
|
|
122
123
|
// Four ambiguous 30-second receipt requests previously consumed the writer's
|
|
123
124
|
// entire two-minute budget. Receipt operations are idempotent and buffered, so
|
|
124
125
|
// keep retry ownership here and allow independent transports enough attempts
|
|
125
|
-
// to recover from a short gateway
|
|
126
|
+
// to recover from a short gateway impairment. This budget covers retryable
|
|
127
|
+
// error responses; requests that get no response at all retry through a whole
|
|
128
|
+
// sandbox network cut instead.
|
|
126
129
|
export const RUNTIME_RECEIPT_STORE_RETRY_BUDGET_MS = 5 * 60_000;
|
|
130
|
+
export const RUNTIME_RECEIPT_STORE_CONNECTION_RETRY_BUDGET_MS =
|
|
131
|
+
RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS;
|
|
127
132
|
|
|
128
133
|
/**
|
|
129
134
|
* The runner's single Work Receipt Adapter.
|
|
@@ -221,6 +226,8 @@ export class RuntimeReceiptStoreAdapter {
|
|
|
221
226
|
maxBufferedItems: options.maxBufferedItems,
|
|
222
227
|
maxBufferedBytes: options.maxBufferedBytes,
|
|
223
228
|
maxRetryElapsedMs: RUNTIME_RECEIPT_STORE_RETRY_BUDGET_MS,
|
|
229
|
+
maxConnectionRetryElapsedMs:
|
|
230
|
+
RUNTIME_RECEIPT_STORE_CONNECTION_RETRY_BUDGET_MS,
|
|
224
231
|
classifyRetryableError: classifyReceiptRetry,
|
|
225
232
|
onRetryEvent: (event) =>
|
|
226
233
|
emitReceiptWriterRetryTelemetry({
|
|
@@ -534,12 +541,16 @@ function receiptCommandOrderingKeys(
|
|
|
534
541
|
}
|
|
535
542
|
}
|
|
536
543
|
|
|
537
|
-
function classifyReceiptRetry(
|
|
544
|
+
function classifyReceiptRetry(
|
|
545
|
+
error: unknown,
|
|
546
|
+
): { retryAfterMs: number; connectionFailure?: boolean } | null {
|
|
538
547
|
if (isAppRuntimeApiCapacityError(error)) {
|
|
539
548
|
return { retryAfterMs: error.retryAfterMs };
|
|
540
549
|
}
|
|
541
550
|
if (error instanceof AppRuntimeApiTransportError) {
|
|
542
|
-
|
|
551
|
+
// The one-attempt transport throws this only when no complete HTTP
|
|
552
|
+
// response arrived: DNS, connect, reset, or its request timeout.
|
|
553
|
+
return { retryAfterMs: 250, connectionFailure: true };
|
|
543
554
|
}
|
|
544
555
|
if (error instanceof AppRuntimeApiResponseError && error.retryable) {
|
|
545
556
|
return { retryAfterMs: 250 };
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
type RetryableReceiptError = {
|
|
2
2
|
retryAfterMs: number;
|
|
3
|
+
/**
|
|
4
|
+
* The request got no HTTP response at all. Time spent this way counts only
|
|
5
|
+
* against `maxConnectionRetryElapsedMs`, never against `maxRetryElapsedMs`.
|
|
6
|
+
*/
|
|
7
|
+
connectionFailure?: boolean;
|
|
3
8
|
};
|
|
4
9
|
|
|
5
10
|
const MAX_RETRY_JITTER_RATIO = 0.25;
|
|
@@ -155,6 +160,7 @@ export class RuntimeReceiptWriter<Input, Output> {
|
|
|
155
160
|
Required<RuntimeReceiptWriterLaneBufferLimit>
|
|
156
161
|
>;
|
|
157
162
|
readonly #maxRetryElapsedMs: number;
|
|
163
|
+
readonly #maxConnectionRetryElapsedMs: number;
|
|
158
164
|
readonly #onRetryEvent:
|
|
159
165
|
| ((event: RuntimeReceiptWriterRetryEvent<Input>) => void)
|
|
160
166
|
| null;
|
|
@@ -219,7 +225,13 @@ export class RuntimeReceiptWriter<Input, Output> {
|
|
|
219
225
|
maxBufferedByLane?: Readonly<
|
|
220
226
|
Record<string, RuntimeReceiptWriterLaneBufferLimit>
|
|
221
227
|
>;
|
|
228
|
+
/** Retry budget for failures that returned an HTTP response. */
|
|
222
229
|
maxRetryElapsedMs?: number;
|
|
230
|
+
/**
|
|
231
|
+
* Retry budget for a batch whose latest failure got no HTTP response,
|
|
232
|
+
* measured from its first attempt. Defaults to `maxRetryElapsedMs`.
|
|
233
|
+
*/
|
|
234
|
+
maxConnectionRetryElapsedMs?: number;
|
|
223
235
|
onRetryEvent?: (event: RuntimeReceiptWriterRetryEvent<Input>) => void;
|
|
224
236
|
/**
|
|
225
237
|
* Called with the writer's buffered byte total every time it changes. The
|
|
@@ -299,6 +311,10 @@ export class RuntimeReceiptWriter<Input, Output> {
|
|
|
299
311
|
options.maxRetryElapsedMs,
|
|
300
312
|
2 * 60_000,
|
|
301
313
|
);
|
|
314
|
+
this.#maxConnectionRetryElapsedMs = normalizePositiveInteger(
|
|
315
|
+
options.maxConnectionRetryElapsedMs,
|
|
316
|
+
this.#maxRetryElapsedMs,
|
|
317
|
+
);
|
|
302
318
|
this.#onRetryEvent = options.onRetryEvent ?? null;
|
|
303
319
|
this.#onBufferedBytesChanged = options.onBufferedBytesChanged ?? null;
|
|
304
320
|
this.#onStatsChanged = options.onStatsChanged ?? null;
|
|
@@ -793,9 +809,14 @@ export class RuntimeReceiptWriter<Input, Output> {
|
|
|
793
809
|
): Promise<readonly Output[]> {
|
|
794
810
|
const inputs = batch.map((pending) => pending.input);
|
|
795
811
|
const startedAt = Date.now();
|
|
812
|
+
// Attempts that got no response, with the waits after them. They do not
|
|
813
|
+
// spend the error-response budget, so a 503 just after a long network cut
|
|
814
|
+
// still gets the full ordinary budget.
|
|
815
|
+
let connectionFailureMs = 0;
|
|
796
816
|
let attempt = 0;
|
|
797
817
|
while (true) {
|
|
798
818
|
attempt += 1;
|
|
819
|
+
const attemptStartedAt = Date.now();
|
|
799
820
|
if (this.#closeController.signal.aborted) {
|
|
800
821
|
throw this.#closeReason;
|
|
801
822
|
}
|
|
@@ -821,20 +842,23 @@ export class RuntimeReceiptWriter<Input, Output> {
|
|
|
821
842
|
const retry = this.#classifyRetryableError(error);
|
|
822
843
|
if (!retry) throw error;
|
|
823
844
|
const elapsedMs = Date.now() - startedAt;
|
|
824
|
-
|
|
845
|
+
const [budgetElapsedMs, budgetMs] = retry.connectionFailure
|
|
846
|
+
? [elapsedMs, this.#maxConnectionRetryElapsedMs]
|
|
847
|
+
: [elapsedMs - connectionFailureMs, this.#maxRetryElapsedMs];
|
|
848
|
+
if (budgetElapsedMs >= budgetMs) {
|
|
825
849
|
throw new RuntimeReceiptWriterRetryDeadlineError(
|
|
826
850
|
attempt,
|
|
827
851
|
elapsedMs,
|
|
828
|
-
|
|
852
|
+
budgetMs,
|
|
829
853
|
{ cause: error },
|
|
830
854
|
);
|
|
831
855
|
}
|
|
832
856
|
const retryAfterMs = jitteredRetryDelayMs(retry.retryAfterMs);
|
|
833
|
-
if (
|
|
857
|
+
if (budgetElapsedMs + retryAfterMs > budgetMs) {
|
|
834
858
|
throw new RuntimeReceiptWriterRetryDeadlineError(
|
|
835
859
|
attempt,
|
|
836
860
|
elapsedMs,
|
|
837
|
-
|
|
861
|
+
budgetMs,
|
|
838
862
|
{ cause: error },
|
|
839
863
|
);
|
|
840
864
|
}
|
|
@@ -848,6 +872,9 @@ export class RuntimeReceiptWriter<Input, Output> {
|
|
|
848
872
|
error,
|
|
849
873
|
});
|
|
850
874
|
await this.#waitForRetry(retryAfterMs, batch);
|
|
875
|
+
if (retry.connectionFailure) {
|
|
876
|
+
connectionFailureMs += Date.now() - attemptStartedAt;
|
|
877
|
+
}
|
|
851
878
|
}
|
|
852
879
|
}
|
|
853
880
|
}
|
|
@@ -24,6 +24,53 @@ export type RuntimePreparedFailedRow = RuntimePreparedCompletedRow & {
|
|
|
24
24
|
error: string;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
// Logical parameter framing for index/null tags and array-element overhead.
|
|
28
|
+
// This is a batching estimate, not an exact wire or executor-memory bound.
|
|
29
|
+
const RUNTIME_PREPARED_ROW_FRAMING_BYTES = 64;
|
|
30
|
+
const preparedRowEncoder = new TextEncoder();
|
|
31
|
+
|
|
32
|
+
/** Chunk already-serialized SQL inputs without touching authored object graphs. */
|
|
33
|
+
export function chunkPreparedRuntimeSheetRows<
|
|
34
|
+
T extends RuntimePreparedCompletedRow & { error?: string },
|
|
35
|
+
>(rows: readonly T[], input: { maxRows: number; maxBytes: number }): T[][] {
|
|
36
|
+
if (
|
|
37
|
+
!Number.isSafeInteger(input.maxRows) ||
|
|
38
|
+
input.maxRows <= 0 ||
|
|
39
|
+
!Number.isSafeInteger(input.maxBytes) ||
|
|
40
|
+
input.maxBytes <= 0
|
|
41
|
+
) {
|
|
42
|
+
throw new Error(
|
|
43
|
+
'Prepared Runtime Sheet chunk limits must be positive safe integers.',
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
const chunks: T[][] = [];
|
|
47
|
+
let chunk: T[] = [];
|
|
48
|
+
let chunkBytes = 0;
|
|
49
|
+
for (const row of rows) {
|
|
50
|
+
const bytes =
|
|
51
|
+
RUNTIME_PREPARED_ROW_FRAMING_BYTES +
|
|
52
|
+
preparedRowEncoder.encode(row.key).byteLength +
|
|
53
|
+
preparedRowEncoder.encode(row.data_patch_json).byteLength +
|
|
54
|
+
preparedRowEncoder.encode(row.cell_meta_patch_json).byteLength +
|
|
55
|
+
(row.error === undefined
|
|
56
|
+
? 0
|
|
57
|
+
: preparedRowEncoder.encode(row.error).byteLength);
|
|
58
|
+
if (
|
|
59
|
+
chunk.length > 0 &&
|
|
60
|
+
(chunk.length >= input.maxRows || bytes > input.maxBytes - chunkBytes)
|
|
61
|
+
) {
|
|
62
|
+
chunks.push(chunk);
|
|
63
|
+
chunk = [];
|
|
64
|
+
chunkBytes = 0;
|
|
65
|
+
}
|
|
66
|
+
// A valid row larger than the target budget remains one intact singleton.
|
|
67
|
+
chunk.push(row);
|
|
68
|
+
chunkBytes += bytes;
|
|
69
|
+
}
|
|
70
|
+
if (chunk.length > 0) chunks.push(chunk);
|
|
71
|
+
return chunks;
|
|
72
|
+
}
|
|
73
|
+
|
|
27
74
|
export function normalizeRuntimeMapInputIndex(value: unknown): number | null {
|
|
28
75
|
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
|
29
76
|
return null;
|
|
@@ -90,19 +90,32 @@ export function resolveRuntimeSandboxComputeItems(input: {
|
|
|
90
90
|
* A provider create may finish after the original run has terminalized. Those
|
|
91
91
|
* resources cannot be appended to the run's already-finalized billing
|
|
92
92
|
* session, so the scheduler settles each through a stable adjustment session.
|
|
93
|
+
*
|
|
94
|
+
* A recovered create is recorded from its reservation, without the ceiling a
|
|
95
|
+
* live create carries, and cleanup may find it weeks later. It still bills no
|
|
96
|
+
* more than one run could: `maxBillingDurationSeconds` fills any missing one.
|
|
93
97
|
*/
|
|
94
98
|
export function resolveLateRuntimeSandboxComputeItems(input: {
|
|
95
99
|
resources: readonly unknown[];
|
|
96
100
|
endedAt: number;
|
|
101
|
+
maxBillingDurationSeconds: number;
|
|
97
102
|
}): ComputeBillingItem[] {
|
|
103
|
+
const lateResources: Record<string, unknown>[] = [];
|
|
104
|
+
for (const resource of input.resources) {
|
|
105
|
+
if (!resource || typeof resource !== 'object' || Array.isArray(resource)) {
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
const value = resource as Record<string, unknown>;
|
|
109
|
+
if (value.lateAcquired !== true) continue;
|
|
110
|
+
lateResources.push({
|
|
111
|
+
...value,
|
|
112
|
+
maxBillingDurationSeconds:
|
|
113
|
+
finiteNonNegative(value.maxBillingDurationSeconds) ??
|
|
114
|
+
input.maxBillingDurationSeconds,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
98
117
|
return resolveRuntimeSandboxComputeItems({
|
|
99
|
-
resources:
|
|
100
|
-
(resource) =>
|
|
101
|
-
Boolean(resource) &&
|
|
102
|
-
typeof resource === 'object' &&
|
|
103
|
-
!Array.isArray(resource) &&
|
|
104
|
-
(resource as Record<string, unknown>).lateAcquired === true,
|
|
105
|
-
),
|
|
118
|
+
resources: lateResources,
|
|
106
119
|
endedAt: input.endedAt,
|
|
107
120
|
});
|
|
108
121
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { PlayRunnerDaytonaCleanupIntent } from '../runner-backends/types';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Sandbox Runs is the portable lifecycle boundary around a physical execution
|
|
3
5
|
* resource. It is deliberately narrower than the scheduler attempt: it does
|
|
@@ -245,12 +247,17 @@ export type SandboxExecutionAdmission = {
|
|
|
245
247
|
providerOperationToken?: string | null;
|
|
246
248
|
/** Resume the existing durable provider operation before any new create. */
|
|
247
249
|
resumeExistingProviderOperation?: boolean;
|
|
250
|
+
/** Existing operation has durable delete intent; cleanup owns it. */
|
|
251
|
+
resumePendingDelete?: boolean;
|
|
248
252
|
/** Scheduler-clock age of the operation being resumed. */
|
|
249
253
|
existingProviderOperationAgeMs?: number;
|
|
250
254
|
}
|
|
251
255
|
| { kind: 'pre_code_deferred'; reason: SandboxPreCodeDeferralReason }
|
|
252
256
|
>;
|
|
253
257
|
releaseCapacity(input: { leaseId: string }): Promise<void>;
|
|
258
|
+
recordDaytonaCleanupIntent?(
|
|
259
|
+
intent: PlayRunnerDaytonaCleanupIntent,
|
|
260
|
+
): Promise<void>;
|
|
254
261
|
claimProviderCircuit(input: {
|
|
255
262
|
provider: Exclude<SandboxProvider, 'local'>;
|
|
256
263
|
}): Promise<{ allowed: boolean; probeToken: string | null }>;
|
|
@@ -312,12 +319,17 @@ export type SandboxExecutionLifecycle = {
|
|
|
312
319
|
providerOperationToken?: string | null;
|
|
313
320
|
/** Resume the existing durable provider operation before any new create. */
|
|
314
321
|
resumeExistingProviderOperation?: boolean;
|
|
322
|
+
/** Existing operation has durable delete intent; cleanup owns it. */
|
|
323
|
+
resumePendingDelete?: boolean;
|
|
315
324
|
/** Scheduler-clock age of the operation being resumed. */
|
|
316
325
|
existingProviderOperationAgeMs?: number;
|
|
317
326
|
}
|
|
318
327
|
| { kind: 'pre_code_deferred'; reason: SandboxPreCodeDeferralReason }
|
|
319
328
|
>;
|
|
320
329
|
releaseCapacity(input: { leaseId: string }): Promise<void>;
|
|
330
|
+
recordDaytonaCleanupIntent?(
|
|
331
|
+
intent: PlayRunnerDaytonaCleanupIntent,
|
|
332
|
+
): Promise<void>;
|
|
321
333
|
claimProviderCircuit(input: {
|
|
322
334
|
provider: Exclude<SandboxProvider, 'local'>;
|
|
323
335
|
}): Promise<{ allowed: boolean; probeToken: string | null }>;
|
|
@@ -249,6 +249,15 @@ function createExecutionLifecycle<Launch, Checkpoint, Suspension, RunnerResult>(
|
|
|
249
249
|
await requireAdmission().reserveCapacity(value),
|
|
250
250
|
releaseCapacity: async (value) =>
|
|
251
251
|
await requireAdmission().releaseCapacity(value),
|
|
252
|
+
recordDaytonaCleanupIntent: async (intent) => {
|
|
253
|
+
const recorder = requireAdmission().recordDaytonaCleanupIntent;
|
|
254
|
+
if (!recorder) {
|
|
255
|
+
throw new Error(
|
|
256
|
+
'Sandbox Runs admission has no Daytona cleanup-intent owner.',
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
await recorder(intent);
|
|
260
|
+
},
|
|
252
261
|
claimProviderCircuit: async (value) =>
|
|
253
262
|
await requireAdmission().claimProviderCircuit(value),
|
|
254
263
|
markProviderHealthy: async (value) =>
|
package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts
CHANGED
|
@@ -188,6 +188,9 @@ function createRunnerCallbacks(input: {
|
|
|
188
188
|
...(outcome.resumeExistingProviderOperation === true
|
|
189
189
|
? { resumeExistingProviderOperation: true }
|
|
190
190
|
: {}),
|
|
191
|
+
...(outcome.resumePendingDelete === true
|
|
192
|
+
? { resumePendingDelete: true }
|
|
193
|
+
: {}),
|
|
191
194
|
...(outcome.existingProviderOperationAgeMs === undefined
|
|
192
195
|
? {}
|
|
193
196
|
: {
|
|
@@ -199,6 +202,13 @@ function createRunnerCallbacks(input: {
|
|
|
199
202
|
releaseSandboxCapacity: async (leaseId) => {
|
|
200
203
|
await input.lifecycle.releaseCapacity({ leaseId });
|
|
201
204
|
},
|
|
205
|
+
...(input.lifecycle.recordDaytonaCleanupIntent
|
|
206
|
+
? {
|
|
207
|
+
recordDaytonaCleanupIntent: async (intent) => {
|
|
208
|
+
await input.lifecycle.recordDaytonaCleanupIntent?.(intent);
|
|
209
|
+
},
|
|
210
|
+
}
|
|
211
|
+
: {}),
|
|
202
212
|
shouldAttemptSandboxProvider: async (provider) =>
|
|
203
213
|
await input.lifecycle.claimProviderCircuit({ provider }),
|
|
204
214
|
markSandboxProviderHealthy: async (provider, probeToken) => {
|
|
@@ -158,6 +158,10 @@ export type PlaySchedulerSubmitInput = RetainedPipelineCarrier & {
|
|
|
158
158
|
* When omitted, legacy schedulers fall back to baseUrl.
|
|
159
159
|
*/
|
|
160
160
|
runtimeApiBaseUrl?: string | null;
|
|
161
|
+
/** The pinned runtime API origin can retire durable array input on terminal delivery. */
|
|
162
|
+
arrayInputTerminalRetirementSupported?: boolean;
|
|
163
|
+
/** Immutable app build that owns terminal array-input retirement. */
|
|
164
|
+
arrayInputTerminalProjectionOrigin?: string | null;
|
|
161
165
|
/**
|
|
162
166
|
* Stable signing origin for executor JWTs. This is intentionally distinct
|
|
163
167
|
* from runtimeApiBaseUrl: a staged Vercel deployment must receive the
|