deepline 0.3.552 → 0.3.553
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 +107 -12
- package/dist/bundling-sources/sdk/src/compat.ts +239 -87
- package/dist/bundling-sources/sdk/src/config.ts +113 -2
- package/dist/bundling-sources/sdk/src/errors.ts +2 -0
- package/dist/bundling-sources/sdk/src/http-core.ts +118 -8
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/integrations.ts +6 -4
- package/dist/bundling-sources/sdk/src/play.ts +3 -0
- 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/runs/watch-polling.ts +8 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +2 -1
- package/dist/bundling-sources/sdk/src/tool-failure-hint.ts +104 -0
- package/dist/bundling-sources/sdk/src/types.ts +9 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +4 -2
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-plan-skus.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +58 -4
- package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +8 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +11 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +103 -5
- package/dist/bundling-sources/shared_libs/monitors/fleets/converge-admission.ts +133 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-attention.ts +165 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-release.ts +726 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-walk.ts +274 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +1 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/provider-bulk-wait.ts +126 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/shared-payload.ts +189 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +4 -0
- package/dist/bundling-sources/shared_libs/monitors/inventory-counter-errors.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +65 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +9 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +152 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +390 -10
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +34 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +66 -30
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +30 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +26 -3
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
- package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +168 -41
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
- package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
- package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +444 -39
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
- package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +72 -0
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +254 -44
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +259 -52
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
- package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
- package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
- package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
- package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
- package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
- package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
- package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
- package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
- package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
- package/dist/cli/{auth-KVSBJZOX.mjs → auth-I3QAU4RV.mjs} +8 -7
- package/dist/cli/auth-MQCN7WGZ.js +44 -0
- package/dist/cli/{billing-54RHFEBI.mjs → billing-3IC54OQQ.mjs} +197 -61
- package/dist/cli/{billing-FQREA7UA.js → billing-YGFFVAIC.js} +297 -161
- package/dist/cli/{chunk-4MK42735.js → chunk-2B5B5KAW.js} +210 -128
- package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
- package/dist/cli/{chunk-4NQF6KJ3.js → chunk-3NTP2OSG.js} +13 -13
- package/dist/cli/{chunk-HYC4MKGK.mjs → chunk-45OAVGU6.mjs} +5 -5
- package/dist/cli/{chunk-WLN3SUIA.js → chunk-4747TPLV.js} +3 -3
- package/dist/cli/{chunk-AZQ264ID.mjs → chunk-4BFTDNHU.mjs} +1 -1
- package/dist/cli/{chunk-BGBJV26E.mjs → chunk-4HYNMXXF.mjs} +4 -4
- package/dist/cli/{chunk-DJ2JDK4O.mjs → chunk-4SMCFQ23.mjs} +1 -1
- package/dist/cli/{chunk-QPKH23EC.mjs → chunk-55F6HNOY.mjs} +5 -5
- package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
- package/dist/cli/{chunk-634ZDA3F.js → chunk-6NE3RRRY.js} +1 -1
- package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
- package/dist/cli/{chunk-EOPEYCY7.mjs → chunk-72V4PDH5.mjs} +18 -18
- package/dist/cli/{chunk-IHRKLXZN.js → chunk-74RES4DS.js} +5 -5
- package/dist/cli/{chunk-45PVGZST.js → chunk-7GEMELKI.js} +366 -320
- package/dist/cli/{chunk-4UUR4TCH.js → chunk-7O6J6A7P.js} +1871 -92
- package/dist/cli/{chunk-XVB7V4N7.js → chunk-7SERLBNR.js} +161 -53
- package/dist/cli/{chunk-F2LH7TGF.js → chunk-7YRJ5UC4.js} +21 -21
- package/dist/cli/{chunk-YJHE3O5M.mjs → chunk-A7DLBE5K.mjs} +136 -54
- package/dist/cli/{chunk-6PRW5UBA.mjs → chunk-AGICYWGN.mjs} +299 -69
- package/dist/cli/{chunk-S5S355UY.mjs → chunk-AGIQDA2T.mjs} +12 -12
- package/dist/cli/{chunk-RBEUVDZF.js → chunk-AGLR6QVN.js} +249 -107
- package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
- package/dist/cli/{chunk-RQZQVFCJ.js → chunk-BVDKFS2T.js} +2 -2
- package/dist/cli/{chunk-PFO3ISXA.js → chunk-CACFJODG.js} +174 -129
- package/dist/cli/{chunk-6RZOWL2V.mjs → chunk-CAEBJOYU.mjs} +1 -1
- package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
- package/dist/cli/{chunk-6YCA5NKJ.js → chunk-DP2VH7CO.js} +12 -12
- package/dist/cli/{chunk-AWJPDPMA.mjs → chunk-DP64MD6U.mjs} +1 -1
- package/dist/cli/{chunk-PTVD2GVQ.mjs → chunk-DZA7RFGL.mjs} +5 -5
- package/dist/cli/{chunk-V436Z54K.js → chunk-E2G2DNAB.js} +3 -1
- package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-E7WZOX2A.mjs} +22 -18
- package/dist/cli/{chunk-IDVVIXPJ.js → chunk-FM7LPUPA.js} +41 -41
- package/dist/cli/{chunk-AQWQ2BFX.mjs → chunk-GAVZ4EOD.mjs} +1 -1
- package/dist/cli/{chunk-GKYAYLRI.js → chunk-HEBO3XNZ.js} +27 -31
- package/dist/cli/{chunk-IYSTRCLX.mjs → chunk-HSJ6X2AQ.mjs} +4 -4
- package/dist/cli/{chunk-UPMRIVZB.js → chunk-HVI55MTK.js} +61 -10
- package/dist/cli/{chunk-KWSH5T7K.js → chunk-IH6GDNKW.js} +21 -21
- package/dist/cli/{chunk-HO3XK3R7.js → chunk-IMX7J4DU.js} +8 -8
- package/dist/cli/{chunk-EUPVF4SU.mjs → chunk-INEMTYMT.mjs} +8 -8
- package/dist/cli/{chunk-3FD5EQ62.js → chunk-IUOGII7D.js} +6 -7
- package/dist/cli/{chunk-U7QRMBIY.mjs → chunk-JJGWHITQ.mjs} +5 -5
- package/dist/cli/{chunk-SHLFOPD6.js → chunk-JLGP5XAJ.js} +5 -5
- package/dist/cli/{chunk-4TALT2M3.mjs → chunk-LFOERUQY.mjs} +69 -3
- package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
- package/dist/cli/{chunk-Z5TSLLOW.mjs → chunk-LH5PZKER.mjs} +63 -18
- package/dist/cli/{chunk-S46HWQKO.js → chunk-LRDHPOZW.js} +69 -69
- package/dist/cli/{chunk-6ZORHRKB.mjs → chunk-LRZGS6RZ.mjs} +2 -0
- package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
- package/dist/cli/{chunk-7IKQKKNX.js → chunk-MLABYI4M.js} +90 -24
- package/dist/cli/{chunk-ZIAXDBXX.mjs → chunk-NDNHYONK.mjs} +17 -21
- package/dist/cli/{chunk-YLTMXJFC.mjs → chunk-OTV2UUKW.mjs} +158 -16
- package/dist/cli/{chunk-G4O75EXF.js → chunk-Q6Z6N3A7.js} +18 -18
- package/dist/cli/{chunk-WE5HES3H.mjs → chunk-QG6JIWUL.mjs} +151 -43
- package/dist/cli/{chunk-QY3ZNU6Z.mjs → chunk-QI5S5HWB.mjs} +2 -2
- package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
- package/dist/cli/{chunk-57VZVF5D.mjs → chunk-RMNOZKRI.mjs} +3 -3
- package/dist/cli/{chunk-BAIST2BR.js → chunk-RTV4RF7N.js} +36 -36
- package/dist/cli/{chunk-JWUAX6OP.js → chunk-SBH4CKPN.js} +11 -11
- package/dist/cli/{chunk-FTJLJCE5.mjs → chunk-SG3LUONJ.mjs} +3 -3
- package/dist/cli/{chunk-2WFPHBR4.js → chunk-TFEXSHPM.js} +22 -18
- package/dist/cli/{chunk-QAORXEY3.mjs → chunk-TN4TY6TT.mjs} +6 -7
- package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-UEVKMZLR.mjs} +54 -3
- package/dist/cli/{chunk-QILKGXYF.mjs → chunk-UVQJYV76.mjs} +2 -2
- package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
- package/dist/cli/{chunk-MF2GHZDO.js → chunk-WOCHZCUJ.js} +2 -2
- package/dist/cli/{chunk-VQALXEXO.js → chunk-XLIHTJVM.js} +348 -118
- package/dist/cli/{chunk-ADRC5I3R.js → chunk-Y6SP3JMI.js} +22 -22
- package/dist/cli/{chunk-77AAAGVB.js → chunk-YUA6HA6D.js} +2 -2
- package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
- package/dist/cli/{chunk-6O5HOODW.mjs → chunk-Z6XPSHKM.mjs} +87 -41
- package/dist/cli/{chunk-QX7LFGJR.mjs → chunk-Z7AOIHFE.mjs} +1870 -91
- package/dist/cli/command-docs.js +3 -3
- package/dist/cli/command-docs.mjs +2 -2
- package/dist/cli/concurrent-runs-help-CFJH4KXV.js +22 -0
- package/dist/cli/{concurrent-runs-help-Q4KPAUJX.mjs → concurrent-runs-help-DNV2X5AZ.mjs} +9 -8
- package/dist/cli/{csv-F5VAGX4K.js → csv-SA6ELJY6.js} +16 -15
- package/dist/cli/{csv-2PTVDNO6.mjs → csv-ZXZGHWOM.mjs} +7 -6
- package/dist/cli/{db-IEDXAUF7.mjs → db-A54SP6AD.mjs} +16 -16
- package/dist/cli/{db-Z3OIUFMM.js → db-JHFEIQBU.js} +43 -43
- package/dist/cli/describe-PHQ33AGS.mjs +50 -0
- package/dist/cli/describe-RHJ4XRFI.js +50 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +6 -6
- package/dist/cli/describe-core.mjs +5 -5
- package/dist/cli/{executions-R3LP74QN.mjs → executions-HL2M2DFU.mjs} +10 -10
- package/dist/cli/{executions-H6H5655J.js → executions-TLFZRHBJ.js} +12 -12
- package/dist/cli/{feedback-VFOUR66B.js → feedback-5UEX5UZK.js} +17 -16
- package/dist/cli/{feedback-WL3MRVT5.mjs → feedback-QMBTNXVG.mjs} +9 -8
- package/dist/cli/git-4JWOOHBG.js +26 -0
- package/dist/cli/{git-YX2J4GCI.mjs → git-LKGXVIVC.mjs} +8 -7
- package/dist/cli/index.js +170 -158
- package/dist/cli/index.mjs +60 -48
- package/dist/cli/{integrations-E2JZYKHS.js → integrations-6RUTLMN7.js} +23 -27
- package/dist/cli/{integrations-5ZK5KLVP.mjs → integrations-FGGRVUJ7.mjs} +15 -19
- package/dist/cli/{legacy-noops-3VW4IJTH.js → legacy-noops-J3Z7QRWZ.js} +12 -11
- package/dist/cli/{legacy-noops-SMN3GSXY.mjs → legacy-noops-YIPRMVXZ.mjs} +9 -8
- package/dist/cli/{mcp-UQV2K4EW.js → mcp-6LWFP7RW.js} +121 -48
- package/dist/cli/{mcp-V6MGCYAG.mjs → mcp-CHDYFO7F.mjs} +100 -27
- package/dist/cli/{monitors-R3BBDCRC.js → monitors-STM6A7OU.js} +221 -186
- package/dist/cli/{monitors-GGKS5W6M.mjs → monitors-UGRY2BXI.mjs} +58 -23
- package/dist/cli/org-3SYOUQCX.mjs +2289 -0
- package/dist/cli/org-ZOBSNSIB.js +2289 -0
- package/dist/cli/outcomes-H4YYAT5X.js +2865 -0
- package/dist/cli/outcomes-Z3P2JE67.mjs +2865 -0
- package/dist/cli/{play-2MVO27VO.js → play-SM4CW2GS.js} +1116 -846
- package/dist/cli/{play-MDWPR4XG.mjs → play-SN5YWLS7.mjs} +375 -105
- package/dist/cli/{providers-AKDYFZJZ.mjs → providers-WZ4YBR5Y.mjs} +10 -10
- package/dist/cli/{providers-2AACRUZH.js → providers-WZARYMCF.js} +13 -13
- package/dist/cli/{quickstart-QDGRJFZY.mjs → quickstart-2575BNKA.mjs} +7 -6
- package/dist/cli/{quickstart-H6IV3PV3.js → quickstart-PS4YHQJ6.js} +9 -8
- package/dist/cli/{run-2634REDK.js → run-FLZ6OTM7.js} +51 -51
- package/dist/cli/{run-RTSQNGRD.mjs → run-ZUHCZOJS.mjs} +31 -31
- package/dist/cli/run-identity-LMLFMACS.js +31 -0
- package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
- package/dist/cli/{search-6AOJ4XPP.mjs → search-HLPPKQEO.mjs} +11 -11
- package/dist/cli/search-JJWVHR3N.js +32 -0
- package/dist/cli/{search-output-6ADMTOU5.mjs → search-output-PDAXNOGP.mjs} +9 -8
- package/dist/cli/{search-output-S5ODBL5E.js → search-output-RXJLU36B.js} +12 -11
- package/dist/cli/{secrets-TFIFBFB3.mjs → secrets-CGELYQ3H.mjs} +11 -11
- package/dist/cli/{secrets-LHCIIHMT.js → secrets-QJNG7G2Y.js} +20 -20
- package/dist/cli/sessions-DHTBT2GN.js +23 -0
- package/dist/cli/{sessions-WHBVUHVW.mjs → sessions-ELMWVR4M.mjs} +9 -8
- package/dist/cli/{settings-CP4FVK2W.js → settings-44I44P5F.js} +89 -89
- package/dist/cli/{settings-EBONWL5C.mjs → settings-RR3LZXL7.mjs} +16 -16
- package/dist/cli/{setup-I5AZE3IU.mjs → setup-KGWRWH4B.mjs} +20 -19
- package/dist/cli/{setup-LFGHTNLQ.js → setup-KTEYOCJO.js} +60 -59
- package/dist/cli/skills-EPZPEXI2.js +37 -0
- package/dist/cli/{skills-W76AO5XE.mjs → skills-FPRID2I5.mjs} +10 -9
- package/dist/cli/tools-IGQQ5TML.js +57 -0
- package/dist/cli/{tools-7IJHGF6W.mjs → tools-PI4WMDLY.mjs} +23 -23
- package/dist/cli/update-4RNCVYGE.js +37 -0
- package/dist/cli/{update-GFOPZTHY.mjs → update-VJOJAZ7B.mjs} +14 -11
- package/dist/cli/{views-BPL2TQJ4.js → views-NTUOLNQU.js} +62 -64
- package/dist/cli/{views-D4NX4SBG.mjs → views-OVPSINZO.mjs} +47 -49
- package/dist/cli/{workflow-ZYNAUCKC.js → workflow-2UDYDM6F.js} +23 -23
- package/dist/cli/{workflow-YXP42FUI.mjs → workflow-7OEFNXZC.mjs} +13 -13
- package/dist/{client-CyXGrO4D.d.mts → client-B8f7RNF8.d.mts} +1 -1
- package/dist/{client-Bf3IpUKN.d.ts → client-C5TgXmJQ.d.ts} +1 -1
- package/dist/{client-core-BxsLnXlm.d.mts → client-core-SLLGBTht.d.mts} +268 -23
- package/dist/{client-core-BWd0lX0Z.d.ts → client-core-p0sOxnkl.d.ts} +268 -23
- package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
- package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
- package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
- package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
- package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
- package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +66 -55
- package/dist/index.mjs +25 -14
- package/dist/install-integrity.json +161 -142
- 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 +23 -4
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +4 -4
- package/dist/plays/run-request.mjs +3 -3
- 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 +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +15 -13
- package/dist/server.mjs +9 -7
- package/package.json +1 -1
- package/dist/cli/auth-MMNVWATX.js +0 -43
- package/dist/cli/concurrent-runs-help-FQAIHKKC.js +0 -21
- package/dist/cli/describe-QDANCTS3.mjs +0 -50
- package/dist/cli/describe-VUTT5ZKU.js +0 -50
- package/dist/cli/git-ETB3GH3K.js +0 -25
- package/dist/cli/org-GRYVMNSW.js +0 -1282
- package/dist/cli/org-Z37NGJV4.mjs +0 -1282
- package/dist/cli/run-identity-G257GQED.js +0 -25
- package/dist/cli/search-VTW2YNBS.js +0 -32
- package/dist/cli/sessions-CJ4FJ2WB.js +0 -22
- package/dist/cli/skills-R7EBXREW.js +0 -36
- package/dist/cli/tools-V7U2BDXM.js +0 -57
- package/dist/cli/update-4COPZETK.js +0 -34
|
@@ -12,9 +12,12 @@ import { RUN_EVENT_KIND } from '../run-event-catalog';
|
|
|
12
12
|
import { hydratePlayRunnerConfig } from '../protocol';
|
|
13
13
|
import { DURABLE_RUNS_ROLLOUT } from '../durable-runs-rollout';
|
|
14
14
|
import {
|
|
15
|
+
readRuntimeToolStartupReadAnswer,
|
|
15
16
|
readStartupReadToolIds,
|
|
17
|
+
RUNTIME_TOOL_STARTUP_READS_TOOL_PARAM,
|
|
16
18
|
staticPipelineStartupReadToolIds,
|
|
17
19
|
} from '../startup-read-tool-ids';
|
|
20
|
+
import { PLAY_RUNTIME_TOOL_STARTUP_READS_PATH } from '../runtime-api-paths';
|
|
18
21
|
import { appendFileSync, createReadStream, writeFileSync } from 'node:fs';
|
|
19
22
|
import { readFile } from 'node:fs/promises';
|
|
20
23
|
import { dirname, isAbsolute, resolve } from 'node:path';
|
|
@@ -63,7 +66,11 @@ import {
|
|
|
63
66
|
runtimeLimitExceededCause,
|
|
64
67
|
runtimeLimitExceededFailure,
|
|
65
68
|
} from '../run-failure';
|
|
66
|
-
import {
|
|
69
|
+
import {
|
|
70
|
+
createPlayContext,
|
|
71
|
+
SERIALIZE_DATASET_ROWS_ONCE,
|
|
72
|
+
} from '../context';
|
|
73
|
+
import { resolveExperimentSwitch } from '../experiment-switches';
|
|
67
74
|
import {
|
|
68
75
|
isHtmlErrorBody,
|
|
69
76
|
normalizeToolHttpErrorMessage,
|
|
@@ -289,6 +296,8 @@ import {
|
|
|
289
296
|
import { RUNTIME_CAPACITY_POLICY } from '../runtime-capacity-policy';
|
|
290
297
|
import { RUNTIME_RELIABILITY_POLICY } from '../runtime-reliability-policy';
|
|
291
298
|
import {
|
|
299
|
+
isAccountAccessUnavailableResponse,
|
|
300
|
+
RUNNER_ACCOUNT_ACCESS_UNAVAILABLE_RETRY_BUDGET_MS,
|
|
292
301
|
RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS,
|
|
293
302
|
RUNNER_GATEWAY_SCHEDULER_UNAVAILABLE_RETRY_BUDGET_MS,
|
|
294
303
|
} from '../runtime-constants';
|
|
@@ -620,6 +629,64 @@ async function sleepRunnerRuntimeControlRetry(ms: number): Promise<void> {
|
|
|
620
629
|
await new Promise<void>((resolve) => setTimeout(resolve, ms));
|
|
621
630
|
}
|
|
622
631
|
|
|
632
|
+
/**
|
|
633
|
+
* Whether the execution gateway attests execute-fenced-v2. Only an answer is
|
|
634
|
+
* a verdict: a definitive response without the attestation means unsupported.
|
|
635
|
+
* A transport failure, timeout or retryable status retries under the runtime
|
|
636
|
+
* control policy and, once exhausted, throws: one unreachable hop is not
|
|
637
|
+
* evidence the gateway lacks the receiver. Answering `false` there failed
|
|
638
|
+
* every row of a Play with "does not support execute-fenced-v2" while the
|
|
639
|
+
* gateway was serving other runs (PR Checks run 44427143252).
|
|
640
|
+
*/
|
|
641
|
+
export async function probeDurableInvocationFenceSupport(input: {
|
|
642
|
+
gatewayBaseUrl: string;
|
|
643
|
+
signal?: AbortSignal;
|
|
644
|
+
fetchImpl?: (url: string, init: RequestInit) => Promise<Response>;
|
|
645
|
+
sleep?: (ms: number) => Promise<void>;
|
|
646
|
+
}): Promise<boolean> {
|
|
647
|
+
const fetchImpl = input.fetchImpl ?? safeNodeOutboundFetch;
|
|
648
|
+
const sleep = input.sleep ?? sleepRunnerRuntimeControlRetry;
|
|
649
|
+
let lastFailure: unknown;
|
|
650
|
+
for (
|
|
651
|
+
let attempt = 1;
|
|
652
|
+
attempt <= RUNNER_RUNTIME_CONTROL_MAX_ATTEMPTS;
|
|
653
|
+
attempt += 1
|
|
654
|
+
) {
|
|
655
|
+
if (attempt > 1) await sleep(runnerRuntimeControlRetryDelayMs(attempt - 1));
|
|
656
|
+
input.signal?.throwIfAborted();
|
|
657
|
+
const timeoutSignal = AbortSignal.timeout(
|
|
658
|
+
RUNNER_RUNTIME_CONTROL_REQUEST_TIMEOUT_MS,
|
|
659
|
+
);
|
|
660
|
+
let response: Response;
|
|
661
|
+
try {
|
|
662
|
+
response = await fetchImpl(`${input.gatewayBaseUrl}/healthz`, {
|
|
663
|
+
redirect: 'manual',
|
|
664
|
+
signal: input.signal
|
|
665
|
+
? AbortSignal.any([input.signal, timeoutSignal])
|
|
666
|
+
: timeoutSignal,
|
|
667
|
+
});
|
|
668
|
+
} catch (error) {
|
|
669
|
+
input.signal?.throwIfAborted();
|
|
670
|
+
lastFailure = error;
|
|
671
|
+
continue;
|
|
672
|
+
}
|
|
673
|
+
if (isRetryableRuntimeControlStatus(response.status)) {
|
|
674
|
+
lastFailure = new Error(`HTTP ${response.status}`);
|
|
675
|
+
continue;
|
|
676
|
+
}
|
|
677
|
+
return (
|
|
678
|
+
response.ok &&
|
|
679
|
+
response.headers.get(DURABLE_INVOCATION_FENCE_ATTESTATION_HEADER) ===
|
|
680
|
+
DURABLE_INVOCATION_FENCE_ATTESTATION_VALUE
|
|
681
|
+
);
|
|
682
|
+
}
|
|
683
|
+
throw new Error(
|
|
684
|
+
`The execution gateway health probe at ${runnerRuntimeControlUrlHost(input.gatewayBaseUrl)} ` +
|
|
685
|
+
`did not answer after ${RUNNER_RUNTIME_CONTROL_MAX_ATTEMPTS} attempt(s). No provider request was submitted.`,
|
|
686
|
+
{ cause: lastFailure },
|
|
687
|
+
);
|
|
688
|
+
}
|
|
689
|
+
|
|
623
690
|
function runnerRuntimeControlUrlHost(url: string): string {
|
|
624
691
|
try {
|
|
625
692
|
return new URL(url).host;
|
|
@@ -648,11 +715,40 @@ export class RunnerRuntimeControlRedirectError extends Error {
|
|
|
648
715
|
* including a failed or non-200 prefetch, falls through to the unchanged
|
|
649
716
|
* request path with its own retries and errors.
|
|
650
717
|
*/
|
|
718
|
+
type RunnerStartupReadAnswer = {
|
|
719
|
+
status: number;
|
|
720
|
+
headers: [string, string][];
|
|
721
|
+
body: string;
|
|
722
|
+
} | null;
|
|
723
|
+
|
|
651
724
|
const runnerStartupReadPrefetch = new Map<
|
|
652
725
|
string,
|
|
653
|
-
Promise<
|
|
726
|
+
Promise<RunnerStartupReadAnswer>
|
|
654
727
|
>();
|
|
655
728
|
|
|
729
|
+
function runnerStartupReadGet(
|
|
730
|
+
url: string,
|
|
731
|
+
headers: Record<string, string>,
|
|
732
|
+
fetchImpl: typeof fetch,
|
|
733
|
+
): Promise<RunnerStartupReadAnswer> {
|
|
734
|
+
return fetchImpl(url, {
|
|
735
|
+
method: 'GET',
|
|
736
|
+
headers,
|
|
737
|
+
redirect: 'manual',
|
|
738
|
+
signal: AbortSignal.timeout(RUNNER_RUNTIME_CONTROL_REQUEST_TIMEOUT_MS),
|
|
739
|
+
}).then(
|
|
740
|
+
async (response) =>
|
|
741
|
+
response.status === 200
|
|
742
|
+
? {
|
|
743
|
+
status: response.status,
|
|
744
|
+
headers: [...response.headers.entries()],
|
|
745
|
+
body: await response.text(),
|
|
746
|
+
}
|
|
747
|
+
: (await response.text().catch(() => ''), null),
|
|
748
|
+
() => null,
|
|
749
|
+
);
|
|
750
|
+
}
|
|
751
|
+
|
|
656
752
|
export function prefetchRunnerRuntimeControlGet(
|
|
657
753
|
url: string,
|
|
658
754
|
headers: Record<string, string>,
|
|
@@ -661,23 +757,130 @@ export function prefetchRunnerRuntimeControlGet(
|
|
|
661
757
|
if (runnerStartupReadPrefetch.has(url)) return;
|
|
662
758
|
runnerStartupReadPrefetch.set(
|
|
663
759
|
url,
|
|
664
|
-
|
|
760
|
+
runnerStartupReadGet(url, headers, fetchImpl),
|
|
761
|
+
);
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/** The gateway's cap on one runtime-tools lookup response. */
|
|
765
|
+
const RUNNER_STARTUP_READ_ANSWER_MAX_BYTES = 256 * 1024;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Switch SR (`startupReadBatch`): the same startup reads as
|
|
769
|
+
* `prefetchRunnerRuntimeControlGet` gives each tool's metadata and auth-scope
|
|
770
|
+
* URL, fetched in one GET (`PLAY_RUNTIME_TOOL_STARTUP_READS_PATH`) whose body
|
|
771
|
+
* carries each per-tool route's status and body. Each URL keeps its own entry
|
|
772
|
+
* and is consumed exactly as before:
|
|
773
|
+
* - a 200 answer is reused once, with the headers the runner reads from that
|
|
774
|
+
* lookup (the relay's recovery transport header, which it sets on this
|
|
775
|
+
* response as on an auth-scope GET);
|
|
776
|
+
* - a non-200 or oversized answer is not reused, so the first real lookup
|
|
777
|
+
* makes the per-tool GET and meets that route's own outcome;
|
|
778
|
+
* - a batch refused at once (any 4xx but 429: an older gateway's or app's
|
|
779
|
+
* refusal of the unknown path), a malformed body, or a body missing a
|
|
780
|
+
* lookup turns that lookup into its per-tool prefetch, as with the switch
|
|
781
|
+
* off;
|
|
782
|
+
* - a batch that failed slowly or under load (timeout, transport error, 5xx,
|
|
783
|
+
* 429) is not repeated per tool: each lookup is a failed prefetch, so the
|
|
784
|
+
* first real lookup makes its own GET with its own retries, and one startup
|
|
785
|
+
* read never waits out two timeouts.
|
|
786
|
+
*/
|
|
787
|
+
export function prefetchRunnerStartupReadsInOneRequest(
|
|
788
|
+
baseUrl: string,
|
|
789
|
+
toolIds: readonly string[],
|
|
790
|
+
headers: Record<string, string>,
|
|
791
|
+
fetchImpl: typeof fetch = fetch,
|
|
792
|
+
): void {
|
|
793
|
+
const reads = toolIds
|
|
794
|
+
.flatMap((toolId) => {
|
|
795
|
+
const base = `${baseUrl}/api/v2/plays/runtime-tools/${encodeURIComponent(toolId)}`;
|
|
796
|
+
return [
|
|
797
|
+
{ toolId, kind: 'metadata' as const, url: base },
|
|
798
|
+
{ toolId, kind: 'authScope' as const, url: `${base}/auth-scope` },
|
|
799
|
+
];
|
|
800
|
+
})
|
|
801
|
+
.filter(({ url }) => !runnerStartupReadPrefetch.has(url));
|
|
802
|
+
if (reads.length === 0) return;
|
|
803
|
+
const query = new URLSearchParams(
|
|
804
|
+
[...new Set(reads.map(({ toolId }) => toolId))].map((toolId) => [
|
|
805
|
+
RUNTIME_TOOL_STARTUP_READS_TOOL_PARAM,
|
|
806
|
+
toolId,
|
|
807
|
+
]),
|
|
808
|
+
);
|
|
809
|
+
const batch = fetchImpl(
|
|
810
|
+
`${baseUrl}${PLAY_RUNTIME_TOOL_STARTUP_READS_PATH}?${query}`,
|
|
811
|
+
{
|
|
665
812
|
method: 'GET',
|
|
666
813
|
headers,
|
|
667
814
|
redirect: 'manual',
|
|
668
815
|
signal: AbortSignal.timeout(RUNNER_RUNTIME_CONTROL_REQUEST_TIMEOUT_MS),
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
816
|
+
},
|
|
817
|
+
)
|
|
818
|
+
.then(
|
|
819
|
+
async (
|
|
820
|
+
response,
|
|
821
|
+
): Promise<
|
|
822
|
+
'refused' | 'failed' | { body: unknown; transport: string | null }
|
|
823
|
+
> => {
|
|
824
|
+
if (response.status !== 200) {
|
|
825
|
+
await response.text().catch(() => '');
|
|
826
|
+
return response.status >= 400 &&
|
|
827
|
+
response.status < 500 &&
|
|
828
|
+
response.status !== 429
|
|
829
|
+
? 'refused'
|
|
830
|
+
: 'failed';
|
|
831
|
+
}
|
|
832
|
+
const text = await response.text();
|
|
833
|
+
let body: unknown;
|
|
834
|
+
try {
|
|
835
|
+
body = JSON.parse(text);
|
|
836
|
+
} catch {
|
|
837
|
+
return 'refused';
|
|
838
|
+
}
|
|
839
|
+
return {
|
|
840
|
+
body,
|
|
841
|
+
transport: response.headers.get(
|
|
842
|
+
RUNTIME_ASYNC_EXECUTION_RECOVERY_TRANSPORT_HEADER,
|
|
843
|
+
),
|
|
844
|
+
};
|
|
845
|
+
},
|
|
846
|
+
)
|
|
847
|
+
.catch(() => 'failed' as const);
|
|
848
|
+
for (const read of reads) {
|
|
849
|
+
runnerStartupReadPrefetch.set(
|
|
850
|
+
read.url,
|
|
851
|
+
batch.then((served) => {
|
|
852
|
+
if (served === 'failed') return null;
|
|
853
|
+
const answer =
|
|
854
|
+
served === 'refused'
|
|
855
|
+
? null
|
|
856
|
+
: readRuntimeToolStartupReadAnswer(
|
|
857
|
+
served.body,
|
|
858
|
+
read.toolId,
|
|
859
|
+
read.kind,
|
|
860
|
+
);
|
|
861
|
+
if (served === 'refused' || !answer)
|
|
862
|
+
return runnerStartupReadGet(read.url, headers, fetchImpl);
|
|
863
|
+
if (
|
|
864
|
+
answer.status !== 200 ||
|
|
865
|
+
new TextEncoder().encode(answer.body).byteLength >
|
|
866
|
+
RUNNER_STARTUP_READ_ANSWER_MAX_BYTES
|
|
867
|
+
)
|
|
868
|
+
return null;
|
|
869
|
+
const answerHeaders: [string, string][] = [
|
|
870
|
+
['content-type', 'application/json'],
|
|
871
|
+
];
|
|
872
|
+
if (read.kind === 'authScope') {
|
|
873
|
+
answerHeaders.push(['cache-control', 'no-store']);
|
|
874
|
+
if (served.transport !== null)
|
|
875
|
+
answerHeaders.push([
|
|
876
|
+
RUNTIME_ASYNC_EXECUTION_RECOVERY_TRANSPORT_HEADER,
|
|
877
|
+
served.transport,
|
|
878
|
+
]);
|
|
879
|
+
}
|
|
880
|
+
return { status: 200, headers: answerHeaders, body: answer.body };
|
|
881
|
+
}),
|
|
882
|
+
);
|
|
883
|
+
}
|
|
681
884
|
}
|
|
682
885
|
|
|
683
886
|
async function takeRunnerStartupRead(
|
|
@@ -719,6 +922,10 @@ export async function prefetchStaticToolStartupReads(
|
|
|
719
922
|
Authorization: `Bearer ${token}`,
|
|
720
923
|
...(await vercelBypassHeaders(config)),
|
|
721
924
|
};
|
|
925
|
+
if (config.context.startupReadBatch === true) {
|
|
926
|
+
prefetchRunnerStartupReadsInOneRequest(baseUrl, [...toolIds], headers);
|
|
927
|
+
return;
|
|
928
|
+
}
|
|
722
929
|
for (const id of toolIds) {
|
|
723
930
|
const base = `${baseUrl}/api/v2/plays/runtime-tools/${encodeURIComponent(id)}`;
|
|
724
931
|
prefetchRunnerRuntimeControlGet(base, headers);
|
|
@@ -785,10 +992,7 @@ export async function fetchRunnerRuntimeControl(input: {
|
|
|
785
992
|
);
|
|
786
993
|
}
|
|
787
994
|
respondedAttempts += 1;
|
|
788
|
-
if (
|
|
789
|
-
input.retrySafe &&
|
|
790
|
-
isRetryableRuntimeControlStatus(response.status)
|
|
791
|
-
) {
|
|
995
|
+
if (input.retrySafe && isRetryableRuntimeControlStatus(response.status)) {
|
|
792
996
|
const delayMs = runnerRuntimeControlRetryDelayMs(respondedAttempts);
|
|
793
997
|
// A declared scheduler-breaker 503 outlasts three quick attempts, so it
|
|
794
998
|
// keeps retrying within its own wall-clock budget, then fails loudly.
|
|
@@ -797,9 +1001,18 @@ export async function fetchRunnerRuntimeControl(input: {
|
|
|
797
1001
|
isRunnerGatewaySchedulerUnavailableResponse(response) &&
|
|
798
1002
|
Date.now() - startedAt + delayMs <=
|
|
799
1003
|
RUNNER_GATEWAY_SCHEDULER_UNAVAILABLE_RETRY_BUDGET_MS;
|
|
1004
|
+
// The app's account-access cutoff could not verify the executor (its
|
|
1005
|
+
// dependency failed); it refused before any route ran. A blip of a few
|
|
1006
|
+
// seconds outlasts three quick attempts, so it gets its own budget.
|
|
1007
|
+
const accountAccessRetryAllowed =
|
|
1008
|
+
!input.init.signal?.aborted &&
|
|
1009
|
+
isAccountAccessUnavailableResponse(response) &&
|
|
1010
|
+
Date.now() - startedAt + delayMs <=
|
|
1011
|
+
RUNNER_ACCOUNT_ACCESS_UNAVAILABLE_RETRY_BUDGET_MS;
|
|
800
1012
|
if (
|
|
801
1013
|
respondedAttempts < RUNNER_RUNTIME_CONTROL_MAX_ATTEMPTS ||
|
|
802
|
-
schedulerOutageRetryAllowed
|
|
1014
|
+
schedulerOutageRetryAllowed ||
|
|
1015
|
+
accountAccessRetryAllowed
|
|
803
1016
|
) {
|
|
804
1017
|
await response.text().catch(() => '');
|
|
805
1018
|
await sleepImpl(delayMs);
|
|
@@ -851,7 +1064,9 @@ export async function fetchRunnerRuntimeControl(input: {
|
|
|
851
1064
|
}
|
|
852
1065
|
}
|
|
853
1066
|
|
|
854
|
-
function createRuntimeToolMetadataResolver(
|
|
1067
|
+
export function createRuntimeToolMetadataResolver(
|
|
1068
|
+
config: PlayRunnerExecutionConfig,
|
|
1069
|
+
) {
|
|
855
1070
|
const cached = new Map<string, Promise<RuntimeToolMetadata>>();
|
|
856
1071
|
|
|
857
1072
|
return async (toolId: string): Promise<RuntimeToolMetadata> => {
|
|
@@ -1557,7 +1772,11 @@ export function playRunnerContextCachePolicy(
|
|
|
1557
1772
|
const policy = playRunnerContextForcePolicy(context);
|
|
1558
1773
|
const window = context.cacheReuseWindowSeconds;
|
|
1559
1774
|
// Optional launch field: older launches carry none.
|
|
1560
|
-
if (
|
|
1775
|
+
if (
|
|
1776
|
+
typeof window !== 'number' ||
|
|
1777
|
+
!Number.isSafeInteger(window) ||
|
|
1778
|
+
window <= 0
|
|
1779
|
+
)
|
|
1561
1780
|
return policy;
|
|
1562
1781
|
return { ...policy, cacheReuseWindowSeconds: window };
|
|
1563
1782
|
}
|
|
@@ -2553,7 +2772,10 @@ async function run(
|
|
|
2553
2772
|
sheetContract?: PlaySheetContract;
|
|
2554
2773
|
}): string[] =>
|
|
2555
2774
|
settlement.sheetContract
|
|
2556
|
-
? datasetDisplayColumnOrder(
|
|
2775
|
+
? datasetDisplayColumnOrder(
|
|
2776
|
+
settlement.columns ?? [],
|
|
2777
|
+
settlement.sheetContract,
|
|
2778
|
+
)
|
|
2557
2779
|
: [...(settlement.columns ?? [])];
|
|
2558
2780
|
const runtimeSheetAttemptKey = (input: {
|
|
2559
2781
|
playName: string;
|
|
@@ -2660,6 +2882,7 @@ async function run(
|
|
|
2660
2882
|
executionGatewayBaseUrl: config.context.executionGatewayBaseUrl,
|
|
2661
2883
|
...playRunnerInvocationFenceFlags(config.context),
|
|
2662
2884
|
runtimeTestFaultHeader: config.context.runtimeTestFaultHeader ?? null,
|
|
2885
|
+
experimentSwitchOverrides: config.context.experimentSwitchOverrides ?? null,
|
|
2663
2886
|
integrationMode: config.context.integrationMode,
|
|
2664
2887
|
docflowEnabled: config.context.docflowEnabled === true,
|
|
2665
2888
|
fixtureBehavior: config.context.fixtureBehavior,
|
|
@@ -2679,27 +2902,7 @@ async function run(
|
|
|
2679
2902
|
) {
|
|
2680
2903
|
return false;
|
|
2681
2904
|
}
|
|
2682
|
-
|
|
2683
|
-
const timeoutSignal = AbortSignal.timeout(
|
|
2684
|
-
RUNNER_RUNTIME_CONTROL_REQUEST_TIMEOUT_MS,
|
|
2685
|
-
);
|
|
2686
|
-
const response = await safeNodeOutboundFetch(
|
|
2687
|
-
`${gatewayBaseUrl}/healthz`,
|
|
2688
|
-
{
|
|
2689
|
-
redirect: 'manual',
|
|
2690
|
-
signal: signal
|
|
2691
|
-
? AbortSignal.any([signal, timeoutSignal])
|
|
2692
|
-
: timeoutSignal,
|
|
2693
|
-
},
|
|
2694
|
-
);
|
|
2695
|
-
return (
|
|
2696
|
-
response.ok &&
|
|
2697
|
-
response.headers.get(DURABLE_INVOCATION_FENCE_ATTESTATION_HEADER) ===
|
|
2698
|
-
DURABLE_INVOCATION_FENCE_ATTESTATION_VALUE
|
|
2699
|
-
);
|
|
2700
|
-
} catch {
|
|
2701
|
-
return false;
|
|
2702
|
-
}
|
|
2905
|
+
return probeDurableInvocationFenceSupport({ gatewayBaseUrl, signal });
|
|
2703
2906
|
},
|
|
2704
2907
|
dbSessionStrategy: config.context.dbSessionStrategy,
|
|
2705
2908
|
createRuntimeSheetDatasetPageReader: (scope) =>
|
|
@@ -3405,6 +3608,13 @@ async function run(
|
|
|
3405
3608
|
attemptSeq: attempt?.attemptSeq ?? runnerRunAttempt,
|
|
3406
3609
|
writeVersion: attempt?.writeVersion ?? null,
|
|
3407
3610
|
},
|
|
3611
|
+
{
|
|
3612
|
+
preparedBody: resolveExperimentSwitch(
|
|
3613
|
+
'SO1',
|
|
3614
|
+
config.context.experimentSwitchOverrides,
|
|
3615
|
+
SERIALIZE_DATASET_ROWS_ONCE,
|
|
3616
|
+
),
|
|
3617
|
+
},
|
|
3408
3618
|
);
|
|
3409
3619
|
const result = await retryRuntimeSheetPersistence({
|
|
3410
3620
|
description: `runtime map persist table=${input.tableNamespace}`,
|
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
export { buildDaytonaPayloadMaterializerSource } from '../../daytona-payload-contract';
|
|
39
39
|
import { compactPlayArtifactForRuntimeTransport } from '../../../plays/artifact-transport';
|
|
40
40
|
import { buildBakedRunnerVerifySource } from '../../baked-runner-image';
|
|
41
|
+
import { resolveExperimentSwitch } from '../../experiment-switches';
|
|
41
42
|
import { DURABLE_RUNS_ROLLOUT } from '../../durable-runs-rollout';
|
|
42
43
|
import type {
|
|
43
44
|
DaytonaExecutionContext,
|
|
@@ -254,6 +255,36 @@ export function buildCombinedMaterializeAndWatchdogSource(
|
|
|
254
255
|
return `{${buildDaytonaPayloadMaterializerSource()}}process.argv.splice(1,6);${watchdogSource}`;
|
|
255
256
|
}
|
|
256
257
|
|
|
258
|
+
/**
|
|
259
|
+
* N1 (off): on the inline baked launch, one Node process verifies the baked
|
|
260
|
+
* runner, materializes the payload and becomes the runtime watchdog. Today
|
|
261
|
+
* that is three Node starts in series before the runner's own (the shell
|
|
262
|
+
* guard's `node -e` verify, the materializer, the watchdog); on the 0.5-core
|
|
263
|
+
* standard sandbox each start is a large share of command-accepted to
|
|
264
|
+
* heartbeat. The verdict line and its meaning are unchanged: it is written
|
|
265
|
+
* first, on the exec's stdout (fd 3, duplicated before the output capture),
|
|
266
|
+
* and any non-`ok` verdict exits 98 before the payload is materialized or the
|
|
267
|
+
* runner is started. The shell then exits 98 without running the
|
|
268
|
+
* crash-terminal epilogue, exactly as the shell guard did. Per-run capable
|
|
269
|
+
* (experiment switch N1). The combined process keeps the materializer's heap
|
|
270
|
+
* for the run (about 13 MiB in the #10002 comparison).
|
|
271
|
+
*/
|
|
272
|
+
export const ONE_NODE_GUARDED_INLINE_LAUNCH = false;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* The N1 verify block: reads the baked runner path, its expected sha256 and
|
|
276
|
+
* the pass marker path from argv[1..3]. On `ok` it first writes the pass
|
|
277
|
+
* marker (a failed write makes the verdict `unverified`, which is not `ok`).
|
|
278
|
+
* It then prints exactly one `baked-runner:<verdict>` line on fd 3 and closes
|
|
279
|
+
* it, and on any verdict but `ok` exits 98. The arguments are then removed, so
|
|
280
|
+
* the materializer and the watchdog read the positions they always had. The
|
|
281
|
+
* shell exits 98 unless the pass marker exists, so a guard that refused or
|
|
282
|
+
* died before a verdict never reaches the epilogue (as with the shell guard).
|
|
283
|
+
*/
|
|
284
|
+
export function buildOneNodeBakedRunnerGuardSource(): string {
|
|
285
|
+
return `{const fs=require('node:fs');const c=require('node:crypto');let r='missing';try{r=c.createHash('sha256').update(fs.readFileSync(process.argv[1])).digest('hex')===process.argv[2]?'ok':'mismatch'}catch(e){}if(r==='ok'){try{fs.writeFileSync(process.argv[3],'ok')}catch(e){r='unverified'}}try{fs.writeSync(3,'baked-runner:'+r+'\\n');fs.closeSync(3)}catch(e){}if(r!=='ok')process.exit(${INLINE_BAKED_RUNNER_UNVERIFIED_EXIT_CODE})}process.argv.splice(1,3);`;
|
|
286
|
+
}
|
|
287
|
+
|
|
257
288
|
/**
|
|
258
289
|
* Crash-containment epilogue (push execution). The parked worker no longer
|
|
259
290
|
* holds anything that returns when the runner process dies, so a runner that
|
|
@@ -727,8 +758,23 @@ function buildDetachedRunnerCommand(input: {
|
|
|
727
758
|
artifactCodePath: string;
|
|
728
759
|
artifactSourceMapPath: string;
|
|
729
760
|
} | null;
|
|
730
|
-
|
|
761
|
+
/**
|
|
762
|
+
* N1: verify this baked runner inside the single materialize-and-watchdog
|
|
763
|
+
* Node process (verdict on fd 3) instead of a separate shell guard. Needs
|
|
764
|
+
* `materialize`.
|
|
765
|
+
*/
|
|
766
|
+
oneNodeBakedGuard?: { path: string; hash: string };
|
|
767
|
+
}): DetachedRunnerPaths & {
|
|
768
|
+
command: string;
|
|
769
|
+
/** N1 only: the marker the guard writes once the baked runner verified. */
|
|
770
|
+
bakedPassMarkerPath?: string;
|
|
771
|
+
} {
|
|
731
772
|
const { workDir, configPath, crashPusherPath, materialize } = input;
|
|
773
|
+
const oneNodeBakedGuard =
|
|
774
|
+
materialize !== null ? (input.oneNodeBakedGuard ?? null) : null;
|
|
775
|
+
const bakedPassMarkerPath = oneNodeBakedGuard
|
|
776
|
+
? `${workDir}/deepline-play-baked-verified-${randomUUID()}.txt`
|
|
777
|
+
: null;
|
|
732
778
|
const runtimeLimitSeconds = input.sandboxRuntimeLimits.timeoutSeconds;
|
|
733
779
|
const outputPath = `${workDir}/deepline-play-output-${randomUUID()}.log`;
|
|
734
780
|
const crashPusherLogPath = `${workDir}/deepline-play-crash-terminal-${randomUUID()}.log`;
|
|
@@ -759,7 +805,9 @@ function buildDetachedRunnerCommand(input: {
|
|
|
759
805
|
? shellQuote(input.nodeBinaryPath)
|
|
760
806
|
: 'node';
|
|
761
807
|
const singleNodeStart =
|
|
762
|
-
materialize !== null &&
|
|
808
|
+
materialize !== null &&
|
|
809
|
+
(oneNodeBakedGuard !== null ||
|
|
810
|
+
DURABLE_RUNS_ROLLOUT.singleNodeMaterializeWatchdog);
|
|
763
811
|
const watchdogSource = buildDaytonaRuntimeWatchdogSource(
|
|
764
812
|
input.sandboxRuntimeLimits,
|
|
765
813
|
input.memoryLimitMiB,
|
|
@@ -770,9 +818,17 @@ function buildDetachedRunnerCommand(input: {
|
|
|
770
818
|
'-e',
|
|
771
819
|
shellQuote(
|
|
772
820
|
singleNodeStart
|
|
773
|
-
? buildCombinedMaterializeAndWatchdogSource(watchdogSource)
|
|
821
|
+
? `${oneNodeBakedGuard ? buildOneNodeBakedRunnerGuardSource() : ''}${buildCombinedMaterializeAndWatchdogSource(watchdogSource)}`
|
|
774
822
|
: watchdogSource,
|
|
775
823
|
),
|
|
824
|
+
// N1 guard arguments, consumed (and removed from argv) first.
|
|
825
|
+
...(oneNodeBakedGuard && bakedPassMarkerPath
|
|
826
|
+
? [
|
|
827
|
+
shellQuote(oneNodeBakedGuard.path),
|
|
828
|
+
shellQuote(oneNodeBakedGuard.hash),
|
|
829
|
+
shellQuote(bakedPassMarkerPath),
|
|
830
|
+
]
|
|
831
|
+
: []),
|
|
776
832
|
// Materializer arguments, consumed (and removed from argv) before the
|
|
777
833
|
// watchdog reads its own.
|
|
778
834
|
...(singleNodeStart && materialize
|
|
@@ -821,10 +877,20 @@ function buildDetachedRunnerCommand(input: {
|
|
|
821
877
|
// Its own retry diagnostics are kept in a separate log: appending them to
|
|
822
878
|
// `outputPath` after a near-gateway-sized result could hide that result from
|
|
823
879
|
// a later bounded-tail recovery read.
|
|
824
|
-
|
|
880
|
+
// N1: unless the guard proved the baked runner (its pass marker), exit 98
|
|
881
|
+
// here, before the epilogue, as the shell guard did: no crash terminal is
|
|
882
|
+
// pushed for a run whose launch falls back to the full upload.
|
|
883
|
+
const bakedRefusalExit = bakedPassMarkerPath
|
|
884
|
+
? `if [ ! -e ${shellQuote(bakedPassMarkerPath)} ]; then exit ${INLINE_BAKED_RUNNER_UNVERIFIED_EXIT_CODE}; fi; `
|
|
885
|
+
: '';
|
|
886
|
+
const bakedRefusalCleanup = bakedPassMarkerPath
|
|
887
|
+
? ` ${shellQuote(bakedPassMarkerPath)}`
|
|
888
|
+
: '';
|
|
889
|
+
const command = `rm -f${bakedRefusalCleanup} ${shellQuote(outputPath)} ${shellQuote(crashPusherLogPath)} ${shellQuote(exitCodePath)} ${shellQuote(oomKillBaselinePath)} ${shellQuote(runnerPidPath)} ${shellQuote(runtimeStartedPath)} ${shellQuote(runtimeCompletedPath)} ${shellQuote(runtimeLimitMarkerPath)} ${shellQuote(terminationDiagnosticPath)} ${shellQuote(memoryLedgerPath)} ${shellQuote(`${memoryLedgerPath}.tmp`)} ${shellQuote(memoryPressurePath)} ${shellQuote(progressEventPath)} ${shellQuote(`${progressEventPath}.*`)} ${shellQuote(startupDiagnosticPath)}; ( awk '$1 == "oom_kill" { print $2 }' /sys/fs/cgroup/memory.events 2>/dev/null || true ) > ${shellQuote(oomKillBaselinePath)}; ( ${runnerCommand} ) > ${shellQuote(outputPath)} 2>&1; code=$?; ${bakedRefusalExit}printf '%s' "$code" > ${shellQuote(exitCodePath)}; ${runtimeReliabilityEnv}${nodeCommand} ${shellQuote(crashPusherPath)} ${shellQuote(configPath)} "$code" ${shellQuote(outputPath)} ${shellQuote(runtimeLimitMarkerPath)} ${shellQuote(oomKillBaselinePath)} /sys/fs/cgroup/memory.events ${shellQuote(terminationDiagnosticPath)} ${shellQuote(runtimeCompletedPath)} > ${shellQuote(crashPusherLogPath)} 2>&1 || true; printf 'deepline runner output captured: %s\\n' ${shellQuote(outputPath)}; exit "$code"`;
|
|
825
890
|
|
|
826
891
|
return {
|
|
827
892
|
command,
|
|
893
|
+
...(bakedPassMarkerPath ? { bakedPassMarkerPath } : {}),
|
|
828
894
|
outputPath,
|
|
829
895
|
exitCodePath,
|
|
830
896
|
oomKillBaselinePath,
|
|
@@ -1221,6 +1287,18 @@ export async function stageRunnerPayload(input: {
|
|
|
1221
1287
|
};
|
|
1222
1288
|
}
|
|
1223
1289
|
|
|
1290
|
+
// N1: only the inline baked launch that verifies in its own command, so a
|
|
1291
|
+
// refusal still exits 98 before anything runs and selects the full upload.
|
|
1292
|
+
const oneNodeBakedGuard =
|
|
1293
|
+
inlineDelivery &&
|
|
1294
|
+
input.bakedRunner?.verifyInCommand === true &&
|
|
1295
|
+
resolveExperimentSwitch(
|
|
1296
|
+
'N1',
|
|
1297
|
+
input.config.context.experimentSwitchOverrides,
|
|
1298
|
+
ONE_NODE_GUARDED_INLINE_LAUNCH,
|
|
1299
|
+
)
|
|
1300
|
+
? { path: input.bakedRunner.path, hash: input.bakedRunner.hash }
|
|
1301
|
+
: null;
|
|
1224
1302
|
const {
|
|
1225
1303
|
command,
|
|
1226
1304
|
outputPath,
|
|
@@ -1233,6 +1311,7 @@ export async function stageRunnerPayload(input: {
|
|
|
1233
1311
|
progressEventPath,
|
|
1234
1312
|
startupDiagnosticPath,
|
|
1235
1313
|
} = buildDetachedRunnerCommand({
|
|
1314
|
+
...(oneNodeBakedGuard ? { oneNodeBakedGuard } : {}),
|
|
1236
1315
|
workDir,
|
|
1237
1316
|
nodeBinaryPath: input.nodeBinaryPath,
|
|
1238
1317
|
sandboxTarget: input.sandbox.target,
|
|
@@ -1263,11 +1342,13 @@ export async function stageRunnerPayload(input: {
|
|
|
1263
1342
|
envelopePath,
|
|
1264
1343
|
envelope: inlineEnvelope,
|
|
1265
1344
|
base64,
|
|
1266
|
-
|
|
1345
|
+
// N1 writes its verdict on fd 3: the exec's stdout, duplicated before
|
|
1346
|
+
// the runner's output capture replaces fd 1.
|
|
1347
|
+
inlineCommand: `${oneNodeBakedGuard ? 'exec 3>&1; ' : ''}${inlineEnvelopeCommandPrefix({
|
|
1267
1348
|
envelopePath,
|
|
1268
1349
|
base64Length: base64.length,
|
|
1269
1350
|
bytes: inlineEnvelope.byteLength,
|
|
1270
|
-
...(input.bakedRunner?.verifyInCommand
|
|
1351
|
+
...(input.bakedRunner?.verifyInCommand && !oneNodeBakedGuard
|
|
1271
1352
|
? {
|
|
1272
1353
|
verifyBakedRunner: {
|
|
1273
1354
|
nodeCommand,
|