deepline 0.3.460 → 0.3.462
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/state.ts +28 -0
- 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 +59 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +94 -1
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +35 -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 +26 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +16 -2
- 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-HKA6ZVHQ.mjs → auth-JDLEY7VU.mjs} +5 -4
- package/dist/cli/auth-UXKY6TCC.js +41 -0
- package/dist/cli/{billing-MTO2ZZ3G.js → billing-HXAXB3XZ.js} +152 -78
- package/dist/cli/{billing-26G44S5N.mjs → billing-SDHLBLMV.mjs} +84 -10
- package/dist/cli/{chunk-BHGII2D6.js → chunk-3ACMRZRV.js} +8 -6
- package/dist/cli/{chunk-S4Q2XCGM.mjs → chunk-3KZCFOZ6.mjs} +1 -1
- package/dist/cli/chunk-4KQ6SIBC.mjs +1038 -0
- package/dist/cli/{chunk-Z2GUFYT6.js → chunk-5LEAXRHV.js} +11 -11
- package/dist/cli/{chunk-XAYO3Q2X.mjs → chunk-6NNVJDVR.mjs} +7 -5
- package/dist/cli/{chunk-NMJ4D2WO.js → chunk-6PMCRYDA.js} +216 -91
- package/dist/cli/{chunk-OMM54B3X.mjs → chunk-6RNQGWFD.mjs} +16 -806
- package/dist/cli/{chunk-EBU7LQ64.js → chunk-6V7KVRR5.js} +3 -3
- package/dist/cli/{chunk-RDPTDDKX.js → chunk-7LFIMWMW.js} +2 -2
- package/dist/cli/chunk-7MJ6VI2T.mjs +19 -0
- package/dist/cli/chunk-7SWNPNML.js +1039 -0
- package/dist/cli/{chunk-CTRPCARW.mjs → chunk-7U3XNPOA.mjs} +267 -38
- package/dist/cli/{chunk-RBTTUYZZ.js → chunk-7VZHXVOQ.js} +1 -1
- package/dist/cli/{chunk-YVBWO647.mjs → chunk-AT636LLU.mjs} +2 -2
- package/dist/cli/{chunk-VTODQWQA.js → chunk-BGTPIMSM.js} +392 -261
- package/dist/cli/{chunk-KADIT5NV.mjs → chunk-CKSOY47X.mjs} +2 -2
- package/dist/cli/{chunk-7DH2FD7Y.mjs → chunk-D464JW3N.mjs} +5 -85
- package/dist/cli/chunk-D6DXOUTO.mjs +827 -0
- package/dist/cli/{describe-QW54QQNB.js → chunk-EM4TXCCI.js} +27 -44
- package/dist/cli/chunk-F6QV42MC.mjs +91 -0
- package/dist/cli/chunk-FKVYR3QA.mjs +1039 -0
- package/dist/cli/{chunk-LMAULZLF.js → chunk-GEGW5HPZ.js} +29 -27
- package/dist/cli/{chunk-M52JQSLK.js → chunk-HUB3CCM2.js} +13 -4
- package/dist/cli/{chunk-YHTQM5XI.js → chunk-I6VHOU5O.js} +27 -27
- package/dist/cli/{chunk-Z2XUZC34.js → chunk-IAYSWZDJ.js} +188 -76
- package/dist/cli/chunk-JF3TLIMQ.js +19 -0
- package/dist/cli/{chunk-HDFRJ4IT.mjs → chunk-JVHOS3K3.mjs} +177 -65
- package/dist/cli/{chunk-LAWEURCT.mjs → chunk-LFXLQEZN.mjs} +1 -1
- package/dist/cli/{chunk-2PBN4SZE.js → chunk-LROWFPGN.js} +16 -16
- package/dist/cli/{chunk-SLEUWLJE.mjs → chunk-MSY22NQW.mjs} +5 -5
- package/dist/cli/{chunk-LVJOFUU7.mjs → chunk-MUUQZIOF.mjs} +23 -49
- package/dist/cli/{chunk-2XHWOQF4.js → chunk-NBLSCHKK.js} +52 -50
- package/dist/cli/{chunk-526R2HON.mjs → chunk-NHRWZPWZ.mjs} +4 -2
- package/dist/cli/{chunk-KXMNM4AQ.js → chunk-NMU3VR5U.js} +4 -5
- package/dist/cli/{chunk-W3BE3CHK.mjs → chunk-O2RX5A66.mjs} +14 -12
- package/dist/cli/{chunk-UKFZT7RF.js → chunk-OMQ23IXL.js} +2 -2
- package/dist/cli/{chunk-LJTFZOHU.js → chunk-OPJAJBD4.js} +28 -54
- package/dist/cli/{chunk-MLFR6DVF.mjs → chunk-PHSEINNH.mjs} +5 -5
- package/dist/cli/{chunk-3DNKFH2G.mjs → chunk-PKHVSIJG.mjs} +19 -1
- package/dist/cli/{chunk-WIYWSYDS.mjs → chunk-Q2EIZKVX.mjs} +3 -3
- package/dist/cli/{chunk-VJAEA4CS.js → chunk-QJZ6WNWD.js} +8 -8
- package/dist/cli/{chunk-EIMG75BT.mjs → chunk-S3A4IXBQ.mjs} +4 -5
- package/dist/cli/{chunk-RZSTT45F.mjs → chunk-S42YIQNE.mjs} +13 -8
- package/dist/cli/{chunk-YULBYKAK.mjs → chunk-S6UAJR6V.mjs} +3 -3
- package/dist/cli/{chunk-G7L27KZB.mjs → chunk-TKAQR3IB.mjs} +31 -21
- package/dist/cli/{chunk-QWRHGGUH.js → chunk-UAJFWWZE.js} +20 -2
- package/dist/cli/{chunk-ZR2RLI4O.mjs → chunk-UDRPEZ5F.mjs} +223 -92
- package/dist/cli/{chunk-QGAWTBIR.js → chunk-ULK7JGGI.js} +511 -282
- package/dist/cli/chunk-V335HGX5.js +1038 -0
- package/dist/cli/{chunk-NH6JSJW6.mjs → chunk-V3MEA7NB.mjs} +7 -5
- package/dist/cli/{chunk-NRGGFVVB.js → chunk-VFGVXXZP.js} +37 -35
- package/dist/cli/chunk-VLEVVDWG.js +91 -0
- package/dist/cli/{chunk-R2GLGLDR.mjs → chunk-VPHN2HAL.mjs} +216 -91
- package/dist/cli/{chunk-CFUTOWE4.js → chunk-WG3KGAII.js} +8 -88
- package/dist/cli/{describe-TOMIAT37.mjs → chunk-WIY6U6GD.mjs} +19 -36
- package/dist/cli/{chunk-YS2YBSJB.js → chunk-XANRM3QA.js} +6 -6
- package/dist/cli/{chunk-KGQNIA37.js → chunk-XQCTG5OO.js} +44 -34
- package/dist/cli/{chunk-EJGBLXDZ.mjs → chunk-XZAFIOUQ.mjs} +1 -1
- package/dist/cli/chunk-Y4DPU4OM.js +827 -0
- package/dist/cli/chunk-YT5EODJO.js +920 -0
- package/dist/cli/{chunk-2WRO2UJ5.js → chunk-ZGQSFYD2.js} +56 -51
- package/dist/cli/{chunk-OJ6RUKVT.mjs → chunk-ZUK6LIJB.mjs} +10 -1
- 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-6FNFYJUC.js → csv-C56GSCEU.js} +13 -12
- package/dist/cli/{csv-MDHT4BKK.mjs → csv-L54JS7TF.mjs} +4 -3
- package/dist/cli/{db-D6AMVOEW.js → db-MOGRMZTA.js} +30 -27
- package/dist/cli/{db-74O3RFWY.mjs → db-YVBUW2DX.mjs} +10 -7
- package/dist/cli/describe-KYEULWPG.js +48 -0
- package/dist/cli/describe-NLZKKT7C.mjs +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-N4FMGVSC.js → executions-A7L4ULPP.js} +9 -7
- package/dist/cli/{executions-PVSF4HUF.mjs → executions-ZBGSTT37.mjs} +7 -5
- package/dist/cli/{feedback-OB7NANZW.mjs → feedback-G6GU37FD.mjs} +6 -5
- package/dist/cli/{feedback-WFSPCAI2.js → feedback-OHLY7RYD.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-P76N4NDQ.js +25 -0
- package/dist/cli/{git-FHUSPAEU.mjs → git-PKZW3QD5.mjs} +5 -4
- package/dist/cli/index.js +152 -142
- package/dist/cli/index.mjs +56 -46
- package/dist/cli/{legacy-noops-ECHNA5HN.js → legacy-noops-5LM3D724.js} +8 -7
- package/dist/cli/{legacy-noops-HMK4BSCI.mjs → legacy-noops-LJJYG6YA.mjs} +5 -4
- package/dist/cli/{monitors-U7VQ3EZM.mjs → monitors-72QV4ALO.mjs} +19 -6
- package/dist/cli/{monitors-XLLFNENH.js → monitors-UX3H5DC2.js} +103 -90
- package/dist/cli/{org-6H3USO5M.mjs → org-6RRRKOCP.mjs} +9 -6
- package/dist/cli/{org-QX6ER2HN.js → org-IF7ISUVB.js} +70 -67
- package/dist/cli/pages-3SU3HKL7.js +252 -0
- package/dist/cli/pages-DXDYYKEK.mjs +252 -0
- package/dist/cli/{play-MOB2WYOR.mjs → play-AHASKRLA.mjs} +512 -1508
- package/dist/cli/{play-WNB7HBZK.js → play-EUIUVLUH.js} +1090 -2086
- package/dist/cli/{providers-CXEZ23E2.mjs → providers-GWGE3WY3.mjs} +7 -5
- package/dist/cli/{providers-7M3DISKX.js → providers-V5WU4VXJ.js} +10 -8
- package/dist/cli/{quickstart-ZFCHKHF6.mjs → quickstart-OXKQ5ZST.mjs} +5 -4
- package/dist/cli/{quickstart-CLJT4AZL.js → quickstart-QP65I5PF.js} +13 -12
- package/dist/cli/run-6MM72IGL.mjs +443 -0
- package/dist/cli/run-F3FTYS56.js +443 -0
- package/dist/cli/search-OYKOOI7A.js +32 -0
- package/dist/cli/{search-FVYWYIC3.mjs → search-ZMEBVJZB.mjs} +8 -6
- package/dist/cli/{secrets-YRLKZQS5.js → secrets-ACND5N6A.js} +16 -14
- package/dist/cli/{secrets-WAMPTQFC.mjs → secrets-XRCJFF3L.mjs} +7 -5
- package/dist/cli/{sessions-IQ332BJH.mjs → sessions-RTK3CEW6.mjs} +5 -4
- package/dist/cli/{sessions-44J6WIVU.js → sessions-ZGRJPCFF.js} +6 -5
- package/dist/cli/{settings-4IJR2I2T.js → settings-PD5KWQQZ.js} +80 -77
- package/dist/cli/{settings-22S6NIFQ.mjs → settings-XDRBPRDE.mjs} +14 -11
- package/dist/cli/{setup-OZUPKKPW.mjs → setup-3HPYAOCC.mjs} +12 -10
- package/dist/cli/{setup-3FWSRNOX.js → setup-E2Q6PXHC.js} +53 -51
- package/dist/cli/{skills-5CW3NFP3.mjs → skills-OOQFMPOV.mjs} +7 -6
- package/dist/cli/skills-XYWV52KB.js +31 -0
- package/dist/cli/tools-ASCDZJCK.js +55 -0
- package/dist/cli/tools-C5ZT3UIC.mjs +55 -0
- package/dist/cli/update-5RQSEIFM.js +33 -0
- package/dist/cli/{update-IBULOV7P.mjs → update-ZWJTADIW.mjs} +9 -8
- package/dist/cli/{workflow-MVZT7MWT.mjs → workflow-23NMPAJ7.mjs} +10 -8
- package/dist/cli/{workflow-Z7FW6GT2.js → workflow-TCXU5YJV.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.mts → compiler-manifest-Dcyd3-Zd.d.mts} +43 -1
- package/dist/{compiler-manifest-CWz_sNOQ.d.ts → 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 +15 -11
- package/dist/index.mjs +14 -10
- 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-VDOCNR7H.js +0 -40
- package/dist/cli/chunk-PQUUWFXY.js +0 -95
- package/dist/cli/chunk-QJLKYYPX.js +0 -1710
- package/dist/cli/chunk-YBWAG72P.mjs +0 -95
- package/dist/cli/git-4PMBJSH5.js +0 -24
- package/dist/cli/search-4CCQCTVD.js +0 -30
- package/dist/cli/skills-LMNM6B5F.js +0 -30
- package/dist/cli/tools-AGBBDJ7P.js +0 -45
- package/dist/cli/tools-NOPBDRGW.mjs +0 -45
- package/dist/cli/update-U3W6USVD.js +0 -32
|
@@ -72,6 +72,7 @@ import {
|
|
|
72
72
|
} from './runtime-heartbeat';
|
|
73
73
|
import {
|
|
74
74
|
formatRunnerGatewayTransportSummary,
|
|
75
|
+
isRunnerGatewayNoResponseError,
|
|
75
76
|
type RunnerGatewayTransportEvent,
|
|
76
77
|
} from './runtime-gateway-transport';
|
|
77
78
|
import { startConfiguredPlayRunnerRuntimeDeadline } from './runtime-deadline';
|
|
@@ -118,7 +119,6 @@ import {
|
|
|
118
119
|
formatDatasetRegistrationLog,
|
|
119
120
|
} from '../dataset-lifecycle-log';
|
|
120
121
|
import {
|
|
121
|
-
assertCustomerPlayReturnWithinLimit,
|
|
122
122
|
RUNTIME_RECEIPT_COMPLETION_BUFFER_MAX_BYTES,
|
|
123
123
|
RUNTIME_RECEIPT_COMPLETION_BUFFER_MAX_ITEMS,
|
|
124
124
|
RUNTIME_RECEIPT_COMPLETION_MAX_IN_FLIGHT_BATCHES,
|
|
@@ -126,9 +126,15 @@ import {
|
|
|
126
126
|
RUNTIME_RECEIPT_CONTROL_BUFFER_MAX_ITEMS,
|
|
127
127
|
RUNTIME_RECEIPT_CONTROL_MAX_IN_FLIGHT_BATCHES,
|
|
128
128
|
RUNNER_POST_TERMINAL_DIAGNOSTIC_MAX_BYTES,
|
|
129
|
+
truncateCustomerPlayReturnWithinLimit,
|
|
129
130
|
} from '../output-size-limits';
|
|
130
131
|
import {
|
|
131
132
|
resolveRuntimeReferencedPlay,
|
|
133
|
+
getRuntimeArrayInputManifest,
|
|
134
|
+
beginRuntimeArrayInput,
|
|
135
|
+
putRuntimeArrayInputPage,
|
|
136
|
+
sealRuntimeArrayInput,
|
|
137
|
+
readRuntimeArrayInputPage,
|
|
132
138
|
createCompleteRuntimeMapRowsOperation,
|
|
133
139
|
finishRuntimeSheetRunMembership,
|
|
134
140
|
createRuntimeSheetDatasetPageReader,
|
|
@@ -137,6 +143,7 @@ import {
|
|
|
137
143
|
readRuntimeSheetDatasetRows,
|
|
138
144
|
releaseRuntimeWorkReceipts,
|
|
139
145
|
startRuntimeSheetDataset,
|
|
146
|
+
startRuntimeSheetDatasetPages,
|
|
140
147
|
supersededRuntimeMapRows,
|
|
141
148
|
type RuntimeMapRowsStaleRow,
|
|
142
149
|
type RuntimeMapRowsWriteResult,
|
|
@@ -240,6 +247,7 @@ import {
|
|
|
240
247
|
} from '../app-runtime-api';
|
|
241
248
|
import { RUNTIME_CAPACITY_POLICY } from '../runtime-capacity-policy';
|
|
242
249
|
import { RUNTIME_RELIABILITY_POLICY } from '../runtime-reliability-policy';
|
|
250
|
+
import { RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS } from '../runtime-constants';
|
|
243
251
|
|
|
244
252
|
const playRuntimeRequire = createRequire(`${process.cwd()}/package.json`);
|
|
245
253
|
const moduleRuntime = playRuntimeRequire('module') as {
|
|
@@ -576,11 +584,11 @@ export async function fetchRunnerRuntimeControl(input: {
|
|
|
576
584
|
}): Promise<Response> {
|
|
577
585
|
const fetchImpl = input.fetchImpl ?? fetch;
|
|
578
586
|
const sleepImpl = input.sleepImpl ?? sleepRunnerRuntimeControlRetry;
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
) {
|
|
587
|
+
const startedAt = Date.now();
|
|
588
|
+
// Error responses spend the ordinary attempts. A request that gets no
|
|
589
|
+
// response at all keeps retrying through a sandbox network cut.
|
|
590
|
+
let respondedAttempts = 0;
|
|
591
|
+
for (let attempt = 1; ; attempt += 1) {
|
|
584
592
|
const timeoutMs =
|
|
585
593
|
input.timeoutMs ?? RUNNER_RUNTIME_CONTROL_REQUEST_TIMEOUT_MS;
|
|
586
594
|
const timeoutSignal = AbortSignal.timeout(timeoutMs);
|
|
@@ -613,14 +621,15 @@ export async function fetchRunnerRuntimeControl(input: {
|
|
|
613
621
|
`gateway and the launch carries vercelProtectionBypassToken.`,
|
|
614
622
|
);
|
|
615
623
|
}
|
|
624
|
+
respondedAttempts += 1;
|
|
616
625
|
if (
|
|
617
626
|
input.retrySafe &&
|
|
618
|
-
|
|
627
|
+
respondedAttempts < RUNNER_RUNTIME_CONTROL_MAX_ATTEMPTS &&
|
|
619
628
|
isRetryableRuntimeControlStatus(response.status)
|
|
620
629
|
) {
|
|
621
630
|
await response.text().catch(() => '');
|
|
622
631
|
await sleepImpl(
|
|
623
|
-
RUNNER_RUNTIME_CONTROL_RETRY_DELAYS_MS[
|
|
632
|
+
RUNNER_RUNTIME_CONTROL_RETRY_DELAYS_MS[respondedAttempts - 1] ?? 250,
|
|
624
633
|
);
|
|
625
634
|
continue;
|
|
626
635
|
}
|
|
@@ -646,17 +655,29 @@ export async function fetchRunnerRuntimeControl(input: {
|
|
|
646
655
|
const transportMessage = timeoutSignal.aborted
|
|
647
656
|
? `timed out after ${timeoutMs}ms`
|
|
648
657
|
: message;
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
658
|
+
const failure = new Error(
|
|
659
|
+
`${input.description} transport failed: ${transportMessage}`,
|
|
660
|
+
);
|
|
661
|
+
if (!input.retrySafe || input.init.signal?.aborted) throw failure;
|
|
662
|
+
const delayMs =
|
|
663
|
+
RUNNER_RUNTIME_CONTROL_RETRY_DELAYS_MS[attempt - 1] ??
|
|
664
|
+
Math.min(
|
|
665
|
+
8_000,
|
|
666
|
+
1_000 * (attempt - RUNNER_RUNTIME_CONTROL_RETRY_DELAYS_MS.length),
|
|
652
667
|
);
|
|
668
|
+
const outageRetryAllowed =
|
|
669
|
+
(timeoutSignal.aborted || isRunnerGatewayNoResponseError(error)) &&
|
|
670
|
+
Date.now() - startedAt + delayMs <=
|
|
671
|
+
RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS;
|
|
672
|
+
if (
|
|
673
|
+
attempt >= RUNNER_RUNTIME_CONTROL_MAX_ATTEMPTS &&
|
|
674
|
+
!outageRetryAllowed
|
|
675
|
+
) {
|
|
676
|
+
throw failure;
|
|
653
677
|
}
|
|
654
|
-
await sleepImpl(
|
|
655
|
-
RUNNER_RUNTIME_CONTROL_RETRY_DELAYS_MS[attempt - 1] ?? 250,
|
|
656
|
-
);
|
|
678
|
+
await sleepImpl(delayMs);
|
|
657
679
|
}
|
|
658
680
|
}
|
|
659
|
-
throw new Error(`${input.description} transport failed.`);
|
|
660
681
|
}
|
|
661
682
|
|
|
662
683
|
function createRuntimeToolMetadataResolver(config: PlayRunnerExecutionConfig) {
|
|
@@ -888,6 +909,7 @@ function createRateStateBackendForConfig(
|
|
|
888
909
|
vercelProtectionBypassToken:
|
|
889
910
|
config.context.vercelProtectionBypassToken ?? null,
|
|
890
911
|
integrationMode: config.context.integrationMode,
|
|
912
|
+
connectionRetryBudgetMs: RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS,
|
|
891
913
|
};
|
|
892
914
|
return {
|
|
893
915
|
requireSharedRateState: true,
|
|
@@ -2211,6 +2233,7 @@ async function run(
|
|
|
2211
2233
|
executorToken: config.context.executorToken ?? '',
|
|
2212
2234
|
vercelProtectionBypassToken: config.context.vercelProtectionBypassToken,
|
|
2213
2235
|
runtimeTestFaultHeader: config.context.runtimeTestFaultHeader ?? null,
|
|
2236
|
+
connectionRetryBudgetMs: RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS,
|
|
2214
2237
|
};
|
|
2215
2238
|
const receiptGatewayResponseObserver = createReceiptGatewayResponseObserver();
|
|
2216
2239
|
const receiptGatewayBaseUrl = config.context.receiptGatewayBaseUrl?.trim();
|
|
@@ -2360,6 +2383,24 @@ async function run(
|
|
|
2360
2383
|
toolResponseContract: config.context.toolResponseContract,
|
|
2361
2384
|
toolResponseReceiptRevision: config.context.toolResponseReceiptRevision,
|
|
2362
2385
|
});
|
|
2386
|
+
const arrayInputRuntimeContext = (scope: {
|
|
2387
|
+
playName: string;
|
|
2388
|
+
runId: string;
|
|
2389
|
+
}) => ({
|
|
2390
|
+
baseUrl: receiptGatewayBaseUrl || config.context.baseUrl,
|
|
2391
|
+
executorToken: config.context.executorToken,
|
|
2392
|
+
// Input snapshots must cross the gateway's current-attempt fence, even
|
|
2393
|
+
// when ordinary row persistence can use a preloaded tenant session.
|
|
2394
|
+
dbSessionStrategy: 'gateway_only' as const,
|
|
2395
|
+
preloadedDbSessions: runtimePreloadedDbSessions,
|
|
2396
|
+
postgresSessionUnwrapKey: runtimePostgresSessionUnwrapKey,
|
|
2397
|
+
abortSignal: persistenceSignal,
|
|
2398
|
+
playName: scope.playName,
|
|
2399
|
+
runId: scope.runId,
|
|
2400
|
+
orgId: config.context.orgId,
|
|
2401
|
+
userEmail: config.context.userEmail,
|
|
2402
|
+
vercelProtectionBypassToken: config.context.vercelProtectionBypassToken,
|
|
2403
|
+
});
|
|
2363
2404
|
const ctx = createPlayContext({
|
|
2364
2405
|
artifactRuntimeContract,
|
|
2365
2406
|
rowAdmissionSignal: options?.rowAdmissionSignal,
|
|
@@ -2435,6 +2476,52 @@ async function run(
|
|
|
2435
2476
|
convexUrl: config.context.convexUrl,
|
|
2436
2477
|
runtimeSchedulerSchema: config.context.runtimeSchedulerSchema ?? null,
|
|
2437
2478
|
runtimeSheetBackedMapDatasets: true,
|
|
2479
|
+
runtimeArrayInputStagingEnabled: true,
|
|
2480
|
+
runtimeArrayInputStore: {
|
|
2481
|
+
getManifest: (scope) =>
|
|
2482
|
+
retryRuntimeSheetPersistence({
|
|
2483
|
+
description: `runtime array input getManifest table=${scope.tableNamespace}`,
|
|
2484
|
+
log: (line) => emitWorkerLog(line, options),
|
|
2485
|
+
signal: persistenceSignal,
|
|
2486
|
+
run: () =>
|
|
2487
|
+
getRuntimeArrayInputManifest(
|
|
2488
|
+
arrayInputRuntimeContext(scope),
|
|
2489
|
+
scope,
|
|
2490
|
+
),
|
|
2491
|
+
}),
|
|
2492
|
+
begin: (input) =>
|
|
2493
|
+
retryRuntimeSheetPersistence({
|
|
2494
|
+
description: `runtime array input begin table=${input.tableNamespace}`,
|
|
2495
|
+
log: (line) => emitWorkerLog(line, options),
|
|
2496
|
+
signal: persistenceSignal,
|
|
2497
|
+
run: () =>
|
|
2498
|
+
beginRuntimeArrayInput(arrayInputRuntimeContext(input), input),
|
|
2499
|
+
}),
|
|
2500
|
+
putPage: (input) =>
|
|
2501
|
+
retryRuntimeSheetPersistence({
|
|
2502
|
+
description: `runtime array input putPage table=${input.tableNamespace}`,
|
|
2503
|
+
log: (line) => emitWorkerLog(line, options),
|
|
2504
|
+
signal: persistenceSignal,
|
|
2505
|
+
run: () =>
|
|
2506
|
+
putRuntimeArrayInputPage(arrayInputRuntimeContext(input), input),
|
|
2507
|
+
}),
|
|
2508
|
+
seal: (input) =>
|
|
2509
|
+
retryRuntimeSheetPersistence({
|
|
2510
|
+
description: `runtime array input seal table=${input.tableNamespace}`,
|
|
2511
|
+
log: (line) => emitWorkerLog(line, options),
|
|
2512
|
+
signal: persistenceSignal,
|
|
2513
|
+
run: () =>
|
|
2514
|
+
sealRuntimeArrayInput(arrayInputRuntimeContext(input), input),
|
|
2515
|
+
}),
|
|
2516
|
+
readPage: (input) =>
|
|
2517
|
+
retryRuntimeSheetPersistence({
|
|
2518
|
+
description: `runtime array input readPage table=${input.tableNamespace}`,
|
|
2519
|
+
log: (line) => emitWorkerLog(line, options),
|
|
2520
|
+
signal: persistenceSignal,
|
|
2521
|
+
run: () =>
|
|
2522
|
+
readRuntimeArrayInputPage(arrayInputRuntimeContext(input), input),
|
|
2523
|
+
}),
|
|
2524
|
+
},
|
|
2438
2525
|
runtimeReceiptClaimsEstablishExecutionFence:
|
|
2439
2526
|
receiptStoreAdapter?.claimsEstablishExecutionFence === true,
|
|
2440
2527
|
workflowId: config.context.workflowId,
|
|
@@ -2644,7 +2731,7 @@ async function run(
|
|
|
2644
2731
|
options,
|
|
2645
2732
|
);
|
|
2646
2733
|
},
|
|
2647
|
-
|
|
2734
|
+
onMapStartPages: async function* (items, tableNamespace, mapContext) {
|
|
2648
2735
|
assertPlayRunnerRuntimeSheetPersistenceContext(config.context);
|
|
2649
2736
|
const { baseUrl, orgId } = config.context;
|
|
2650
2737
|
const startedAt = Date.now();
|
|
@@ -2681,153 +2768,161 @@ async function run(
|
|
|
2681
2768
|
// after a scheduler wake recreates this Map. Retain the local version as
|
|
2682
2769
|
// an additional consistency check across pages of this runner.
|
|
2683
2770
|
const existingAttempt = runtimeSheetAttempts.get(attemptKey);
|
|
2684
|
-
const
|
|
2685
|
-
description: `runtime map start table=${tableNamespace}`,
|
|
2686
|
-
log: (line) => emitWorkerLog(line, options),
|
|
2687
|
-
signal: persistenceSignal,
|
|
2688
|
-
run: () =>
|
|
2689
|
-
startRuntimeSheetDataset(
|
|
2690
|
-
{
|
|
2691
|
-
executorToken,
|
|
2692
|
-
baseUrl,
|
|
2693
|
-
vercelProtectionBypassToken:
|
|
2694
|
-
config.context.vercelProtectionBypassToken,
|
|
2695
|
-
orgId,
|
|
2696
|
-
playName,
|
|
2697
|
-
runId,
|
|
2698
|
-
userEmail,
|
|
2699
|
-
dbSessionStrategy: config.context.dbSessionStrategy,
|
|
2700
|
-
preloadedDbSessions: canUseRootPreloadedDbSessions
|
|
2701
|
-
? runtimePreloadedDbSessions
|
|
2702
|
-
: undefined,
|
|
2703
|
-
postgresSessionUnwrapKey: canUseRootPreloadedDbSessions
|
|
2704
|
-
? runtimePostgresSessionUnwrapKey
|
|
2705
|
-
: executorToken,
|
|
2706
|
-
abortSignal: persistenceSignal,
|
|
2707
|
-
},
|
|
2708
|
-
{
|
|
2709
|
-
playName,
|
|
2710
|
-
tableNamespace,
|
|
2711
|
-
playInput: runtimeInputObject,
|
|
2712
|
-
sheetContract: augmentSheetContractWithDatasetFields({
|
|
2713
|
-
contract: sheetContract,
|
|
2714
|
-
rows: items,
|
|
2715
|
-
columnTypes: mapContext.columnTypes,
|
|
2716
|
-
}),
|
|
2717
|
-
rows: items,
|
|
2718
|
-
stableWriteIntent: true,
|
|
2719
|
-
pendingRerunAdmission: true,
|
|
2720
|
-
includePreviousCells: mapContext.includePreviousCells,
|
|
2721
|
-
previousCellsBudgetBytes: mapContext.previousCellsBudgetBytes,
|
|
2722
|
-
inputOffset: mapContext.inputOffset,
|
|
2723
|
-
mode: mapContext.mode,
|
|
2724
|
-
runId,
|
|
2725
|
-
attemptId: deterministicRuntimeSheetAttemptId({
|
|
2726
|
-
playName,
|
|
2727
|
-
runId,
|
|
2728
|
-
tableNamespace,
|
|
2729
|
-
attemptSeq: runnerRunAttempt,
|
|
2730
|
-
}),
|
|
2731
|
-
attemptOwnerRunId: runId,
|
|
2732
|
-
attemptSeq: runnerRunAttempt,
|
|
2733
|
-
...runtimeSheetStartWriteVersion(existingAttempt),
|
|
2734
|
-
...(playRunnerContextRuntimeSheetForce(config.context)
|
|
2735
|
-
? { force: true }
|
|
2736
|
-
: {}),
|
|
2737
|
-
},
|
|
2738
|
-
),
|
|
2739
|
-
});
|
|
2740
|
-
if (mapStartResult.membershipCapture === true)
|
|
2741
|
-
membershipCapturingMaps.add(attemptKey);
|
|
2742
|
-
const datasetId = createRuntimeDatasetId(playName, tableNamespace);
|
|
2743
|
-
const datasetPath = `datasets.${tableNamespace}`;
|
|
2744
|
-
const settlement = runtimeMapDatasetSettlements.get(datasetId) ?? {
|
|
2745
|
-
datasetId,
|
|
2746
|
-
path: datasetPath,
|
|
2747
|
-
tableNamespace,
|
|
2748
|
-
runId,
|
|
2749
|
-
persistedRows: 0,
|
|
2750
|
-
succeededRows: 0,
|
|
2751
|
-
failedRows: 0,
|
|
2752
|
-
};
|
|
2753
|
-
// `completedRows` is the sheet admission result, not a terminal write
|
|
2754
|
-
// for this run. Normal maps still execute every admitted row (the tool
|
|
2755
|
-
// receipt may be reused inside that execution), and their terminal
|
|
2756
|
-
// callback below is the authoritative settlement. Counting these rows
|
|
2757
|
-
// here as well would report N rows at map start and another N rows at
|
|
2758
|
-
// terminal persistence, advertising 2N rows for an N-row Dataset Handle.
|
|
2759
|
-
// `net_new` maps exclude these rows before execution, so they must not
|
|
2760
|
-
// be counted here either.
|
|
2761
|
-
runtimeMapDatasetSettlements.set(datasetId, settlement);
|
|
2762
|
-
emitRunnerEvent(
|
|
2771
|
+
const admissionPages = startRuntimeSheetDatasetPages(
|
|
2763
2772
|
{
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
// reporting only its last page.
|
|
2781
|
-
bornFrom: {
|
|
2782
|
-
table: tableNamespace,
|
|
2783
|
-
rowCountIn: (mapContext.inputOffset ?? 0) + items.length,
|
|
2784
|
-
},
|
|
2785
|
-
at: Date.now(),
|
|
2786
|
-
},
|
|
2773
|
+
executorToken,
|
|
2774
|
+
baseUrl,
|
|
2775
|
+
vercelProtectionBypassToken:
|
|
2776
|
+
config.context.vercelProtectionBypassToken,
|
|
2777
|
+
orgId,
|
|
2778
|
+
playName,
|
|
2779
|
+
runId,
|
|
2780
|
+
userEmail,
|
|
2781
|
+
dbSessionStrategy: config.context.dbSessionStrategy,
|
|
2782
|
+
preloadedDbSessions: canUseRootPreloadedDbSessions
|
|
2783
|
+
? runtimePreloadedDbSessions
|
|
2784
|
+
: undefined,
|
|
2785
|
+
postgresSessionUnwrapKey: canUseRootPreloadedDbSessions
|
|
2786
|
+
? runtimePostgresSessionUnwrapKey
|
|
2787
|
+
: executorToken,
|
|
2788
|
+
abortSignal: persistenceSignal,
|
|
2787
2789
|
},
|
|
2788
|
-
options,
|
|
2789
|
-
);
|
|
2790
|
-
emitRunnerEvent(
|
|
2791
2790
|
{
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2791
|
+
playName,
|
|
2792
|
+
tableNamespace,
|
|
2793
|
+
sheetContract: augmentSheetContractWithDatasetFields({
|
|
2794
|
+
contract: sheetContract,
|
|
2795
|
+
rows: items,
|
|
2796
|
+
columnTypes: mapContext.columnTypes,
|
|
2798
2797
|
}),
|
|
2798
|
+
rows: items,
|
|
2799
|
+
stableWriteIntent: true,
|
|
2800
|
+
pendingRerunAdmission: true,
|
|
2801
|
+
includePreviousCells: mapContext.includePreviousCells,
|
|
2802
|
+
previousCellsBudgetBytes: mapContext.previousCellsBudgetBytes,
|
|
2803
|
+
inputOffset: mapContext.inputOffset,
|
|
2804
|
+
mode: mapContext.mode,
|
|
2805
|
+
runId,
|
|
2806
|
+
attemptId: deterministicRuntimeSheetAttemptId({
|
|
2807
|
+
playName,
|
|
2808
|
+
runId,
|
|
2809
|
+
tableNamespace,
|
|
2810
|
+
attemptSeq: runnerRunAttempt,
|
|
2811
|
+
}),
|
|
2812
|
+
attemptOwnerRunId: runId,
|
|
2813
|
+
attemptSeq: runnerRunAttempt,
|
|
2814
|
+
...runtimeSheetStartWriteVersion(existingAttempt),
|
|
2815
|
+
...(playRunnerContextRuntimeSheetForce(config.context)
|
|
2816
|
+
? { force: true }
|
|
2817
|
+
: {}),
|
|
2818
|
+
},
|
|
2819
|
+
{
|
|
2820
|
+
runPage: (run) =>
|
|
2821
|
+
retryRuntimeSheetPersistence({
|
|
2822
|
+
description: `runtime map start table=${tableNamespace}`,
|
|
2823
|
+
log: (line) => emitWorkerLog(line, options),
|
|
2824
|
+
signal: persistenceSignal,
|
|
2825
|
+
run,
|
|
2826
|
+
}),
|
|
2799
2827
|
},
|
|
2800
|
-
options,
|
|
2801
2828
|
);
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
mapStartResult.
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2829
|
+
let registered = false;
|
|
2830
|
+
for await (const mapStartResult of admissionPages) {
|
|
2831
|
+
if (mapStartResult.membershipCapture === true)
|
|
2832
|
+
membershipCapturingMaps.add(attemptKey);
|
|
2833
|
+
if (!registered) {
|
|
2834
|
+
registered = true;
|
|
2835
|
+
const datasetId = createRuntimeDatasetId(playName, tableNamespace);
|
|
2836
|
+
const datasetPath = `datasets.${tableNamespace}`;
|
|
2837
|
+
const settlement = runtimeMapDatasetSettlements.get(datasetId) ?? {
|
|
2838
|
+
datasetId,
|
|
2839
|
+
path: datasetPath,
|
|
2810
2840
|
tableNamespace,
|
|
2811
2841
|
runId,
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2842
|
+
persistedRows: 0,
|
|
2843
|
+
succeededRows: 0,
|
|
2844
|
+
failedRows: 0,
|
|
2845
|
+
};
|
|
2846
|
+
// `completedRows` is the sheet admission result, not a terminal write
|
|
2847
|
+
// for this run. Normal maps still execute every admitted row (the tool
|
|
2848
|
+
// receipt may be reused inside that execution), and their terminal
|
|
2849
|
+
// callback below is the authoritative settlement. Counting these rows
|
|
2850
|
+
// here as well would report N rows at map start and another N rows at
|
|
2851
|
+
// terminal persistence, advertising 2N rows for an N-row Dataset Handle.
|
|
2852
|
+
// `net_new` maps exclude these rows before execution, so they must not
|
|
2853
|
+
// be counted here either.
|
|
2854
|
+
runtimeMapDatasetSettlements.set(datasetId, settlement);
|
|
2855
|
+
emitRunnerEvent(
|
|
2856
|
+
{
|
|
2857
|
+
type: 'execution_event',
|
|
2858
|
+
event: {
|
|
2859
|
+
type: RUN_EVENT_KIND.datasetLifecycle,
|
|
2860
|
+
datasetId,
|
|
2861
|
+
path: datasetPath,
|
|
2862
|
+
tableNamespace,
|
|
2863
|
+
phase: 'registered',
|
|
2864
|
+
persistedRows: 0,
|
|
2865
|
+
succeededRows: 0,
|
|
2866
|
+
failedRows: 0,
|
|
2867
|
+
complete: false,
|
|
2868
|
+
// ADR 0019 dataset-grain row birth. These rows entered from
|
|
2869
|
+
// play-body code, so the only witnessed fact is how many arrived at
|
|
2870
|
+
// this table — never a per-row source mapping, which the runtime
|
|
2871
|
+
// does not see here. `rowCountIn` counts rows admitted through this
|
|
2872
|
+
// boundary so far, so a paged dataset converges upward instead of
|
|
2873
|
+
// reporting only its last page.
|
|
2874
|
+
bornFrom: {
|
|
2875
|
+
table: tableNamespace,
|
|
2876
|
+
rowCountIn: (mapContext.inputOffset ?? 0) + items.length,
|
|
2877
|
+
},
|
|
2878
|
+
at: Date.now(),
|
|
2879
|
+
},
|
|
2819
2880
|
},
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2881
|
+
options,
|
|
2882
|
+
);
|
|
2883
|
+
emitRunnerEvent(
|
|
2884
|
+
{
|
|
2885
|
+
type: 'log',
|
|
2886
|
+
at: new Date().toISOString(),
|
|
2887
|
+
source: 'play',
|
|
2888
|
+
line: formatDatasetRegistrationLog({
|
|
2889
|
+
dataset: { path: datasetPath, tableNamespace },
|
|
2890
|
+
rows: items.length,
|
|
2891
|
+
}),
|
|
2892
|
+
},
|
|
2893
|
+
options,
|
|
2894
|
+
);
|
|
2895
|
+
}
|
|
2896
|
+
if (
|
|
2897
|
+
mapStartResult.attemptId &&
|
|
2898
|
+
mapStartResult.attemptOwnerRunId &&
|
|
2899
|
+
mapStartResult.attemptExpiresAt
|
|
2900
|
+
) {
|
|
2901
|
+
runtimeSheetAttempts.set(
|
|
2902
|
+
attemptKey,
|
|
2903
|
+
runtimeSheetAttemptForMapStart({
|
|
2904
|
+
tableNamespace,
|
|
2905
|
+
runId,
|
|
2906
|
+
existing: runtimeSheetAttempts.get(attemptKey),
|
|
2907
|
+
mapStartResult: {
|
|
2908
|
+
attemptId: mapStartResult.attemptId,
|
|
2909
|
+
attemptOwnerRunId: mapStartResult.attemptOwnerRunId,
|
|
2910
|
+
attemptExpiresAt: mapStartResult.attemptExpiresAt,
|
|
2911
|
+
attemptSeq: mapStartResult.attemptSeq,
|
|
2912
|
+
writeVersion: mapStartResult.writeVersion,
|
|
2913
|
+
},
|
|
2914
|
+
runnerRunAttempt,
|
|
2915
|
+
}),
|
|
2916
|
+
);
|
|
2917
|
+
}
|
|
2918
|
+
inserted += mapStartResult.inserted;
|
|
2919
|
+
skipped += mapStartResult.skipped;
|
|
2920
|
+
yield mapStartResult;
|
|
2823
2921
|
}
|
|
2824
2922
|
emitWorkerLog(
|
|
2825
2923
|
`[perf] runtime map setup table=${tableNamespace} rows=${items.length} elapsed_ms=${Date.now() - startedAt}`,
|
|
2826
2924
|
options,
|
|
2827
2925
|
);
|
|
2828
|
-
inserted += mapStartResult.inserted;
|
|
2829
|
-
skipped += mapStartResult.skipped;
|
|
2830
|
-
return mapStartResult;
|
|
2831
2926
|
},
|
|
2832
2927
|
onMapRowsCheckpoint: async (input) => {
|
|
2833
2928
|
if (input.updates.length === 0) return;
|
|
@@ -2878,6 +2973,8 @@ async function run(
|
|
|
2878
2973
|
vercelProtectionBypassToken:
|
|
2879
2974
|
config.context.vercelProtectionBypassToken,
|
|
2880
2975
|
signal: persistenceSignal,
|
|
2976
|
+
connectionRetryBudgetMs:
|
|
2977
|
+
RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS,
|
|
2881
2978
|
},
|
|
2882
2979
|
{
|
|
2883
2980
|
playName,
|
|
@@ -3800,10 +3897,27 @@ export function projectPlayResultForTransport(
|
|
|
3800
3897
|
output[key] = entry;
|
|
3801
3898
|
}
|
|
3802
3899
|
|
|
3803
|
-
|
|
3900
|
+
const boundedOutput = truncateCustomerPlayReturnWithinLimit({
|
|
3804
3901
|
value: output,
|
|
3805
3902
|
});
|
|
3806
|
-
return {
|
|
3903
|
+
return {
|
|
3904
|
+
output: boundedOutput.value,
|
|
3905
|
+
warnings: boundedOutput.truncated
|
|
3906
|
+
? [
|
|
3907
|
+
{
|
|
3908
|
+
code: 'RUN_OUTPUT_TRUNCATED',
|
|
3909
|
+
reason: 'byte_limit',
|
|
3910
|
+
message:
|
|
3911
|
+
'The Play return was truncated to fit the output limit. Return a Dataset Handle to keep a large result recoverable.',
|
|
3912
|
+
originalBytesAtLeast: boundedOutput.originalBytesAtLeast,
|
|
3913
|
+
retainedBytes: boundedOutput.retainedBytes,
|
|
3914
|
+
limitBytes: boundedOutput.limitBytes,
|
|
3915
|
+
retryable: false,
|
|
3916
|
+
recoverableFrom: 'none',
|
|
3917
|
+
},
|
|
3918
|
+
]
|
|
3919
|
+
: [],
|
|
3920
|
+
};
|
|
3807
3921
|
}
|
|
3808
3922
|
|
|
3809
3923
|
function serializePlayResult<T>(value: T): T {
|
package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-gateway-transport.ts
CHANGED
|
@@ -58,6 +58,23 @@ export function runnerGatewayTransportErrorCode(error: unknown): string {
|
|
|
58
58
|
return SAFE_ERROR_NAMES.has(name) ? name : 'unknown';
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* True when a request got no HTTP response at all: DNS, connect, reset, or a
|
|
63
|
+
* socket that stalled. Node's fetch reports these as `fetch failed` or
|
|
64
|
+
* `terminated` with an errno or undici code on the cause.
|
|
65
|
+
*/
|
|
66
|
+
export function isRunnerGatewayNoResponseError(error: unknown): boolean {
|
|
67
|
+
if (
|
|
68
|
+
/^(?:E[A-Z0-9_]+|UND_ERR_[A-Z0-9_]+)$/.test(
|
|
69
|
+
runnerGatewayTransportErrorCode(error),
|
|
70
|
+
)
|
|
71
|
+
) {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
const message = error instanceof Error ? error.message : '';
|
|
75
|
+
return /^(?:fetch failed|terminated)$/i.test(message);
|
|
76
|
+
}
|
|
77
|
+
|
|
61
78
|
export function updateRunnerGatewayTransportSummary(
|
|
62
79
|
previous: RunnerGatewayTransportSummary | null,
|
|
63
80
|
event: RunnerGatewayTransportEvent,
|